| @@ -1,29 +1,38 @@ | | | @@ -1,29 +1,38 @@ |
1 | $NetBSD: patch-texk_web2c_luatexdir_lua_lepdflib.cc,v 1.3 2017/12/31 00:41:19 markd Exp $ | | 1 | $NetBSD: patch-texk_web2c_luatexdir_lua_lepdflib.cc,v 1.4 2018/04/29 20:57:26 ryoon Exp $ |
2 | | | 2 | |
3 | Add support for newer poppler's from ArchLinux | | 3 | Add support for newer poppler's from ArchLinux |
4 | | | 4 | |
5 | --- texk/web2c/luatexdir/lua/lepdflib.cc.orig 2017-03-11 01:04:06.000000000 +0000 | | 5 | --- texk/web2c/luatexdir/lua/lepdflib.cc.orig 2017-03-11 01:04:06.000000000 +0000 |
6 | +++ texk/web2c/luatexdir/lua/lepdflib.cc | | 6 | +++ texk/web2c/luatexdir/lua/lepdflib.cc |
| | | 7 | @@ -521,7 +521,7 @@ static int m_##in##_##function(lua_State |
| | | 8 | uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \ |
| | | 9 | if (uin->pd != NULL && uin->pd->pc != uin->pc) \ |
| | | 10 | pdfdoc_changed_error(L); \ |
| | | 11 | - gs = ((in *) uin->d)->function(); \ |
| | | 12 | + gs = const_cast<GooString*>(((in *) uin->d)->function()); \ |
| | | 13 | if (gs != NULL) \ |
| | | 14 | lua_pushlstring(L, gs->getCString(), gs->getLength()); \ |
| | | 15 | else \ |
7 | @@ -538,7 +538,7 @@ static int m_##in##_##function(lua_State | | 16 | @@ -538,7 +538,7 @@ static int m_##in##_##function(lua_State |
8 | pdfdoc_changed_error(L); \ | | 17 | pdfdoc_changed_error(L); \ |
9 | uout = new_Object_userdata(L); \ | | 18 | uout = new_Object_userdata(L); \ |
10 | uout->d = new Object(); \ | | 19 | uout->d = new Object(); \ |
11 | - ((in *) uin->d)->function((Object *) uout->d); \ | | 20 | - ((in *) uin->d)->function((Object *) uout->d); \ |
12 | + *((Object *)uout->d) = ((in *) uin->d)->function(); \ | | 21 | + *((Object *)uout->d) = ((in *) uin->d)->function(); \ |
13 | uout->atype = ALLOC_LEPDF; \ | | 22 | uout->atype = ALLOC_LEPDF; \ |
14 | uout->pc = uin->pc; \ | | 23 | uout->pc = uin->pc; \ |
15 | uout->pd = uin->pd; \ | | 24 | uout->pd = uin->pd; \ |
16 | @@ -668,13 +668,11 @@ static const struct luaL_Reg Annots_m[] | | 25 | @@ -668,13 +668,11 @@ static const struct luaL_Reg Annots_m[] |
17 | | | 26 | |
18 | static int m_Array_incRef(lua_State * L) | | 27 | static int m_Array_incRef(lua_State * L) |
19 | { | | 28 | { |
20 | - int i; | | 29 | - int i; |
21 | udstruct *uin; | | 30 | udstruct *uin; |
22 | uin = (udstruct *) luaL_checkudata(L, 1, M_Array); | | 31 | uin = (udstruct *) luaL_checkudata(L, 1, M_Array); |
23 | if (uin->pd != NULL && uin->pd->pc != uin->pc) | | 32 | if (uin->pd != NULL && uin->pd->pc != uin->pc) |
24 | pdfdoc_changed_error(L); | | 33 | pdfdoc_changed_error(L); |
25 | - i = ((Array *) uin->d)->incRef(); | | 34 | - i = ((Array *) uin->d)->incRef(); |
26 | - lua_pushinteger(L, i); | | 35 | - lua_pushinteger(L, i); |
27 | + lua_pushinteger(L, 1); | | 36 | + lua_pushinteger(L, 1); |
28 | return 1; | | 37 | return 1; |
29 | } | | 38 | } |
| @@ -149,27 +158,27 @@ Add support for newer poppler's from Arc | | | @@ -149,27 +158,27 @@ Add support for newer poppler's from Arc |
149 | uout->pd = uin->pd; | | 158 | uout->pd = uin->pd; |
150 | @@ -1381,9 +1374,9 @@ static int m_Object_initBool(lua_State * | | 159 | @@ -1381,9 +1374,9 @@ static int m_Object_initBool(lua_State * |
151 | pdfdoc_changed_error(L); | | 160 | pdfdoc_changed_error(L); |
152 | luaL_checktype(L, 2, LUA_TBOOLEAN); | | 161 | luaL_checktype(L, 2, LUA_TBOOLEAN); |
153 | if (lua_toboolean(L, 2) != 0) | | 162 | if (lua_toboolean(L, 2) != 0) |
154 | - ((Object *) uin->d)->initBool(gTrue); | | 163 | - ((Object *) uin->d)->initBool(gTrue); |
155 | + *((Object *) uin->d) = Object(gTrue); | | 164 | + *((Object *) uin->d) = Object(gTrue); |
156 | else | | 165 | else |
157 | - ((Object *) uin->d)->initBool(gFalse); | | 166 | - ((Object *) uin->d)->initBool(gFalse); |
158 | + *((Object *) uin->d) = Object(gFalse); | | 167 | + *((Object *) uin->d) = Object(gFalse); |
159 | return 0; | | 168 | return 0; |
160 | } | | 169 | } |
161 | | | 170 | |
162 | @@ -1395,7 +1388,7 @@ static int m_Object_initInt(lua_State * | | 171 | @@ -1395,7 +1388,7 @@ static int m_Object_initInt(lua_State * |
163 | if (uin->pd != NULL && uin->pd->pc != uin->pc) | | 172 | if (uin->pd != NULL && uin->pd->pc != uin->pc) |
164 | pdfdoc_changed_error(L); | | 173 | pdfdoc_changed_error(L); |
165 | i = luaL_checkint(L, 2); | | 174 | i = luaL_checkint(L, 2); |
166 | - ((Object *) uin->d)->initInt(i); | | 175 | - ((Object *) uin->d)->initInt(i); |
167 | + *((Object *) uin->d) = Object(i); | | 176 | + *((Object *) uin->d) = Object(i); |
168 | return 0; | | 177 | return 0; |
169 | } | | 178 | } |
170 | | | 179 | |
171 | @@ -1407,7 +1400,7 @@ static int m_Object_initReal(lua_State * | | 180 | @@ -1407,7 +1400,7 @@ static int m_Object_initReal(lua_State * |
172 | if (uin->pd != NULL && uin->pd->pc != uin->pc) | | 181 | if (uin->pd != NULL && uin->pd->pc != uin->pc) |
173 | pdfdoc_changed_error(L); | | 182 | pdfdoc_changed_error(L); |
174 | d = luaL_checknumber(L, 2); | | 183 | d = luaL_checknumber(L, 2); |
175 | - ((Object *) uin->d)->initReal(d); | | 184 | - ((Object *) uin->d)->initReal(d); |
| @@ -201,108 +210,117 @@ Add support for newer poppler's from Arc | | | @@ -201,108 +210,117 @@ Add support for newer poppler's from Arc |
201 | pdfdoc_changed_error(L); | | 210 | pdfdoc_changed_error(L); |
202 | - ((Object *) uin->d)->initNull(); | | 211 | - ((Object *) uin->d)->initNull(); |
203 | + *((Object *) uin->d) = Object(objNull); | | 212 | + *((Object *) uin->d) = Object(objNull); |
204 | return 0; | | 213 | return 0; |
205 | } | | 214 | } |
206 | | | 215 | |
207 | static int m_Object_initArray(lua_State * L) | | 216 | static int m_Object_initArray(lua_State * L) |
208 | { | | 217 | { |
209 | udstruct *uin, *uxref; | | 218 | udstruct *uin, *uxref; |
210 | + Array *a; | | 219 | + Array *a; |
211 | uin = (udstruct *) luaL_checkudata(L, 1, M_Object); | | 220 | uin = (udstruct *) luaL_checkudata(L, 1, M_Object); |
212 | uxref = (udstruct *) luaL_checkudata(L, 2, M_XRef); | | 221 | uxref = (udstruct *) luaL_checkudata(L, 2, M_XRef); |
213 | if (uin->pd != NULL && uxref->pd != NULL && uin->pd != uxref->pd) | | 222 | if (uin->pd != NULL && uxref->pd != NULL && uin->pd != uxref->pd) |
214 | @@ -1458,7 +1452,8 @@ static int m_Object_initArray(lua_State | | 223 | @@ -1458,7 +1452,8 @@ static int m_Object_initArray(lua_State |
215 | if ((uin->pd != NULL && uin->pd->pc != uin->pc) | | 224 | if ((uin->pd != NULL && uin->pd->pc != uin->pc) |
216 | || (uxref->pd != NULL && uxref->pd->pc != uxref->pc)) | | 225 | || (uxref->pd != NULL && uxref->pd->pc != uxref->pc)) |
217 | pdfdoc_changed_error(L); | | 226 | pdfdoc_changed_error(L); |
218 | - ((Object *) uin->d)->initArray((XRef *) uxref->d); | | 227 | - ((Object *) uin->d)->initArray((XRef *) uxref->d); |
219 | + a = new Array((XRef *) uxref->d); | | 228 | + a = new Array((XRef *) uxref->d); |
220 | + *((Object *) uin->d) = Object(a); | | 229 | + *((Object *) uin->d) = Object(a); |
221 | return 0; | | 230 | return 0; |
222 | } | | 231 | } |
223 | | | 232 | |
224 | @@ -1469,6 +1464,7 @@ static int m_Object_initArray(lua_State | | 233 | @@ -1469,6 +1464,7 @@ static int m_Object_initArray(lua_State |
225 | static int m_Object_initDict(lua_State * L) | | 234 | static int m_Object_initDict(lua_State * L) |
226 | { | | 235 | { |
227 | udstruct *uin, *uxref; | | 236 | udstruct *uin, *uxref; |
228 | + Dict *d; | | 237 | + Dict *d; |
229 | uin = (udstruct *) luaL_checkudata(L, 1, M_Object); | | 238 | uin = (udstruct *) luaL_checkudata(L, 1, M_Object); |
230 | uxref = (udstruct *) luaL_checkudata(L, 2, M_XRef); | | 239 | uxref = (udstruct *) luaL_checkudata(L, 2, M_XRef); |
231 | if (uin->pd != NULL && uxref->pd != NULL && uin->pd != uxref->pd) | | 240 | if (uin->pd != NULL && uxref->pd != NULL && uin->pd != uxref->pd) |
232 | @@ -1476,7 +1472,8 @@ static int m_Object_initDict(lua_State * | | 241 | @@ -1476,7 +1472,8 @@ static int m_Object_initDict(lua_State * |
233 | if ((uin->pd != NULL && uin->pd->pc != uin->pc) | | 242 | if ((uin->pd != NULL && uin->pd->pc != uin->pc) |
234 | || (uxref->pd != NULL && uxref->pd->pc != uxref->pc)) | | 243 | || (uxref->pd != NULL && uxref->pd->pc != uxref->pc)) |
235 | pdfdoc_changed_error(L); | | 244 | pdfdoc_changed_error(L); |
236 | - ((Object *) uin->d)->initDict((XRef *) uxref->d); | | 245 | - ((Object *) uin->d)->initDict((XRef *) uxref->d); |
237 | + d = new Dict((XRef *) uxref->d); | | 246 | + d = new Dict((XRef *) uxref->d); |
238 | + *((Object *) uin->d) = Object(d); | | 247 | + *((Object *) uin->d) = Object(d); |
239 | return 0; | | 248 | return 0; |
240 | } | | 249 | } |
241 | | | 250 | |
242 | @@ -1490,7 +1487,7 @@ static int m_Object_initStream(lua_State | | 251 | @@ -1490,7 +1487,7 @@ static int m_Object_initStream(lua_State |
243 | if ((uin->pd != NULL && uin->pd->pc != uin->pc) | | 252 | if ((uin->pd != NULL && uin->pd->pc != uin->pc) |
244 | || (ustream->pd != NULL && ustream->pd->pc != ustream->pc)) | | 253 | || (ustream->pd != NULL && ustream->pd->pc != ustream->pc)) |
245 | pdfdoc_changed_error(L); | | 254 | pdfdoc_changed_error(L); |
246 | - ((Object *) uin->d)->initStream((Stream *) ustream->d); | | 255 | - ((Object *) uin->d)->initStream((Stream *) ustream->d); |
247 | + *((Object *) uin->d) = Object((Stream *) ustream->d); | | 256 | + *((Object *) uin->d) = Object((Stream *) ustream->d); |
248 | return 0; | | 257 | return 0; |
249 | } | | 258 | } |
250 | | | 259 | |
251 | @@ -1503,7 +1500,7 @@ static int m_Object_initRef(lua_State * | | 260 | @@ -1503,7 +1500,7 @@ static int m_Object_initRef(lua_State * |
252 | pdfdoc_changed_error(L); | | 261 | pdfdoc_changed_error(L); |
253 | num = luaL_checkint(L, 2); | | 262 | num = luaL_checkint(L, 2); |
254 | gen = luaL_checkint(L, 3); | | 263 | gen = luaL_checkint(L, 3); |
255 | - ((Object *) uin->d)->initRef(num, gen); | | 264 | - ((Object *) uin->d)->initRef(num, gen); |
256 | + *((Object *) uin->d) = Object(num, gen); | | 265 | + *((Object *) uin->d) = Object(num, gen); |
257 | return 0; | | 266 | return 0; |
258 | } | | 267 | } |
259 | | | 268 | |
260 | @@ -1515,7 +1512,7 @@ static int m_Object_initCmd(lua_State * | | 269 | @@ -1515,7 +1512,7 @@ static int m_Object_initCmd(lua_State * |
261 | if (uin->pd != NULL && uin->pd->pc != uin->pc) | | 270 | if (uin->pd != NULL && uin->pd->pc != uin->pc) |
262 | pdfdoc_changed_error(L); | | 271 | pdfdoc_changed_error(L); |
263 | s = luaL_checkstring(L, 2); | | 272 | s = luaL_checkstring(L, 2); |
264 | - ((Object *) uin->d)->initCmd(CHARP_CAST s); | | 273 | - ((Object *) uin->d)->initCmd(CHARP_CAST s); |
265 | + *((Object *) uin->d) = Object(objCmd, CHARP_CAST s); | | 274 | + *((Object *) uin->d) = Object(objCmd, CHARP_CAST s); |
266 | return 0; | | 275 | return 0; |
267 | } | | 276 | } |
268 | | | 277 | |
269 | @@ -1525,7 +1522,7 @@ static int m_Object_initError(lua_State | | 278 | @@ -1525,7 +1522,7 @@ static int m_Object_initError(lua_State |
270 | uin = (udstruct *) luaL_checkudata(L, 1, M_Object); | | 279 | uin = (udstruct *) luaL_checkudata(L, 1, M_Object); |
271 | if (uin->pd != NULL && uin->pd->pc != uin->pc) | | 280 | if (uin->pd != NULL && uin->pd->pc != uin->pc) |
272 | pdfdoc_changed_error(L); | | 281 | pdfdoc_changed_error(L); |
273 | - ((Object *) uin->d)->initError(); | | 282 | - ((Object *) uin->d)->initError(); |
274 | + *((Object *) uin->d) = Object(objError); | | 283 | + *((Object *) uin->d) = Object(objError); |
275 | return 0; | | 284 | return 0; |
276 | } | | 285 | } |
277 | | | 286 | |
278 | @@ -1535,7 +1532,7 @@ static int m_Object_initEOF(lua_State * | | 287 | @@ -1535,7 +1532,7 @@ static int m_Object_initEOF(lua_State * |
279 | uin = (udstruct *) luaL_checkudata(L, 1, M_Object); | | 288 | uin = (udstruct *) luaL_checkudata(L, 1, M_Object); |
280 | if (uin->pd != NULL && uin->pd->pc != uin->pc) | | 289 | if (uin->pd != NULL && uin->pd->pc != uin->pc) |
281 | pdfdoc_changed_error(L); | | 290 | pdfdoc_changed_error(L); |
282 | - ((Object *) uin->d)->initEOF(); | | 291 | - ((Object *) uin->d)->initEOF(); |
283 | + *((Object *) uin->d) = Object(objEOF); | | 292 | + *((Object *) uin->d) = Object(objEOF); |
284 | return 0; | | 293 | return 0; |
285 | } | | 294 | } |
286 | | | 295 | |
287 | @@ -1551,7 +1548,7 @@ static int m_Object_fetch(lua_State * L) | | 296 | @@ -1551,7 +1548,7 @@ static int m_Object_fetch(lua_State * L) |
288 | pdfdoc_changed_error(L); | | 297 | pdfdoc_changed_error(L); |
289 | uout = new_Object_userdata(L); | | 298 | uout = new_Object_userdata(L); |
290 | uout->d = new Object(); | | 299 | uout->d = new Object(); |
291 | - ((Object *) uin->d)->fetch((XRef *) uxref->d, (Object *) uout->d); | | 300 | - ((Object *) uin->d)->fetch((XRef *) uxref->d, (Object *) uout->d); |
292 | + *((Object *) uout->d) = ((Object *) uin->d)->fetch((XRef *) uxref->d); | | 301 | + *((Object *) uout->d) = ((Object *) uin->d)->fetch((XRef *) uxref->d); |
293 | uout->atype = ALLOC_LEPDF; | | 302 | uout->atype = ALLOC_LEPDF; |
294 | uout->pc = uin->pc; | | 303 | uout->pc = uin->pc; |
295 | uout->pd = uin->pd; | | 304 | uout->pd = uin->pd; |
| | | 305 | @@ -1659,7 +1656,7 @@ static int m_Object_getString(lua_State |
| | | 306 | if (uin->pd != NULL && uin->pd->pc != uin->pc) |
| | | 307 | pdfdoc_changed_error(L); |
| | | 308 | if (((Object *) uin->d)->isString()) { |
| | | 309 | - gs = ((Object *) uin->d)->getString(); |
| | | 310 | + gs = const_cast<GooString*>(((Object *) uin->d)->getString()); |
| | | 311 | lua_pushlstring(L, gs->getCString(), gs->getLength()); |
| | | 312 | } else |
| | | 313 | lua_pushnil(L); |
296 | @@ -1816,7 +1813,7 @@ static int m_Object_arrayAdd(lua_State * | | 314 | @@ -1816,7 +1813,7 @@ static int m_Object_arrayAdd(lua_State * |
297 | pdfdoc_changed_error(L); | | 315 | pdfdoc_changed_error(L); |
298 | if (!((Object *) uin->d)->isArray()) | | 316 | if (!((Object *) uin->d)->isArray()) |
299 | luaL_error(L, "Object is not an Array"); | | 317 | luaL_error(L, "Object is not an Array"); |
300 | - ((Object *) uin->d)->arrayAdd((Object *) uobj->d); | | 318 | - ((Object *) uin->d)->arrayAdd((Object *) uobj->d); |
301 | + ((Object *) uin->d)->arrayAdd(std::move(*((Object *) uobj->d))); | | 319 | + ((Object *) uin->d)->arrayAdd(std::move(*((Object *) uobj->d))); |
302 | return 0; | | 320 | return 0; |
303 | } | | 321 | } |
304 | | | 322 | |
305 | @@ -1833,7 +1830,7 @@ static int m_Object_arrayGet(lua_State * | | 323 | @@ -1833,7 +1830,7 @@ static int m_Object_arrayGet(lua_State * |
306 | if (i > 0 && i <= len) { | | 324 | if (i > 0 && i <= len) { |
307 | uout = new_Object_userdata(L); | | 325 | uout = new_Object_userdata(L); |
308 | uout->d = new Object(); | | 326 | uout->d = new Object(); |
| @@ -310,36 +328,36 @@ Add support for newer poppler's from Arc | | | @@ -310,36 +328,36 @@ Add support for newer poppler's from Arc |
310 | + *((Object *) uout->d) = ((Object *) uin->d)->arrayGet(i - 1); | | 328 | + *((Object *) uout->d) = ((Object *) uin->d)->arrayGet(i - 1); |
311 | uout->atype = ALLOC_LEPDF; | | 329 | uout->atype = ALLOC_LEPDF; |
312 | uout->pc = uin->pc; | | 330 | uout->pc = uin->pc; |
313 | uout->pd = uin->pd; | | 331 | uout->pd = uin->pd; |
314 | @@ -1857,7 +1854,7 @@ static int m_Object_arrayGetNF(lua_State | | 332 | @@ -1857,7 +1854,7 @@ static int m_Object_arrayGetNF(lua_State |
315 | if (i > 0 && i <= len) { | | 333 | if (i > 0 && i <= len) { |
316 | uout = new_Object_userdata(L); | | 334 | uout = new_Object_userdata(L); |
317 | uout->d = new Object(); | | 335 | uout->d = new Object(); |
318 | - ((Object *) uin->d)->arrayGetNF(i - 1, (Object *) uout->d); | | 336 | - ((Object *) uin->d)->arrayGetNF(i - 1, (Object *) uout->d); |
319 | + *((Object *) uout->d) = ((Object *) uin->d)->arrayGetNF(i - 1); | | 337 | + *((Object *) uout->d) = ((Object *) uin->d)->arrayGetNF(i - 1); |
320 | uout->atype = ALLOC_LEPDF; | | 338 | uout->atype = ALLOC_LEPDF; |
321 | uout->pc = uin->pc; | | 339 | uout->pc = uin->pc; |
322 | uout->pd = uin->pd; | | 340 | uout->pd = uin->pd; |
323 | @@ -1897,7 +1894,7 @@ static int m_Object_dictAdd(lua_State * | | 341 | @@ -1897,7 +1894,7 @@ static int m_Object_dictAdd(lua_State * |
324 | pdfdoc_changed_error(L); | | 342 | pdfdoc_changed_error(L); |
325 | if (!((Object *) uin->d)->isDict()) | | 343 | if (!((Object *) uin->d)->isDict()) |
326 | luaL_error(L, "Object is not a Dict"); | | 344 | luaL_error(L, "Object is not a Dict"); |
327 | - ((Object *) uin->d)->dictAdd(copyString(s), (Object *) uobj->d); | | 345 | - ((Object *) uin->d)->dictAdd(copyString(s), (Object *) uobj->d); |
328 | + ((Object *) uin->d)->dictAdd(copyString(s), std::move(*((Object *) uobj->d))); | | 346 | + ((Object *) uin->d)->dictAdd(copyString(s), std::move(*((Object *) uobj->d))); |
329 | return 0; | | 347 | return 0; |
330 | } | | 348 | } |
331 | | | 349 | |
332 | @@ -1915,7 +1912,7 @@ static int m_Object_dictSet(lua_State * | | 350 | @@ -1915,7 +1912,7 @@ static int m_Object_dictSet(lua_State * |
333 | pdfdoc_changed_error(L); | | 351 | pdfdoc_changed_error(L); |
334 | if (!((Object *) uin->d)->isDict()) | | 352 | if (!((Object *) uin->d)->isDict()) |
335 | luaL_error(L, "Object is not a Dict"); | | 353 | luaL_error(L, "Object is not a Dict"); |
336 | - ((Object *) uin->d)->dictSet(s, (Object *) uobj->d); | | 354 | - ((Object *) uin->d)->dictSet(s, (Object *) uobj->d); |
337 | + ((Object *) uin->d)->dictSet(s, std::move(*((Object *) uobj->d))); | | 355 | + ((Object *) uin->d)->dictSet(s, std::move(*((Object *) uobj->d))); |
338 | return 0; | | 356 | return 0; |
339 | } | | 357 | } |
340 | | | 358 | |
341 | @@ -1930,7 +1927,7 @@ static int m_Object_dictLookup(lua_State | | 359 | @@ -1930,7 +1927,7 @@ static int m_Object_dictLookup(lua_State |
342 | if (((Object *) uin->d)->isDict()) { | | 360 | if (((Object *) uin->d)->isDict()) { |
343 | uout = new_Object_userdata(L); | | 361 | uout = new_Object_userdata(L); |
344 | uout->d = new Object(); | | 362 | uout->d = new Object(); |
345 | - ((Object *) uin->d)->dictLookup(s, (Object *) uout->d); | | 363 | - ((Object *) uin->d)->dictLookup(s, (Object *) uout->d); |
| @@ -373,27 +391,27 @@ Add support for newer poppler's from Arc | | | @@ -373,27 +391,27 @@ Add support for newer poppler's from Arc |
373 | + *((Object *) uout->d) = ((Object *) uin->d)->dictGetValNF(i - 1); | | 391 | + *((Object *) uout->d) = ((Object *) uin->d)->dictGetValNF(i - 1); |
374 | uout->atype = ALLOC_LEPDF; | | 392 | uout->atype = ALLOC_LEPDF; |
375 | uout->pc = uin->pc; | | 393 | uout->pc = uin->pc; |
376 | uout->pd = uin->pd; | | 394 | uout->pd = uin->pd; |
377 | @@ -2243,7 +2240,7 @@ m_poppler_get_poppler(Page, Stream, getM | | 395 | @@ -2243,7 +2240,7 @@ m_poppler_get_poppler(Page, Stream, getM |
378 | m_poppler_get_poppler(Page, Dict, getPieceInfo); | | 396 | m_poppler_get_poppler(Page, Dict, getPieceInfo); |
379 | m_poppler_get_poppler(Page, Dict, getSeparationInfo); | | 397 | m_poppler_get_poppler(Page, Dict, getSeparationInfo); |
380 | m_poppler_get_poppler(Page, Dict, getResourceDict); | | 398 | m_poppler_get_poppler(Page, Dict, getResourceDict); |
381 | -m_poppler_get_OBJECT(Page, getAnnots); | | 399 | -m_poppler_get_OBJECT(Page, getAnnots); |
382 | +m_poppler_get_OBJECT(Page, getAnnotsObject); | | 400 | +m_poppler_get_OBJECT(Page, getAnnotsObject); |
383 | | | 401 | |
384 | m_poppler_get_OBJECT(Page, getContents); | | 402 | m_poppler_get_OBJECT(Page, getContents); |
385 | | | 403 | |
386 | @@ -2270,7 +2267,7 @@ static const struct luaL_Reg Page_m[] = | | 404 | @@ -2270,7 +2267,7 @@ static const struct luaL_Reg Page_m[] = |
387 | {"getPieceInfo", m_Page_getPieceInfo}, | | 405 | {"getPieceInfo", m_Page_getPieceInfo}, |
388 | {"getSeparationInfo", m_Page_getSeparationInfo}, | | 406 | {"getSeparationInfo", m_Page_getSeparationInfo}, |
389 | {"getResourceDict", m_Page_getResourceDict}, | | 407 | {"getResourceDict", m_Page_getResourceDict}, |
390 | - {"getAnnots", m_Page_getAnnots}, | | 408 | - {"getAnnots", m_Page_getAnnots}, |
391 | + {"getAnnots", m_Page_getAnnotsObject}, | | 409 | + {"getAnnots", m_Page_getAnnotsObject}, |
392 | {"getContents", m_Page_getContents}, | | 410 | {"getContents", m_Page_getContents}, |
393 | {"__tostring", m_Page__tostring}, | | 411 | {"__tostring", m_Page__tostring}, |
394 | {NULL, NULL} // sentinel | | 412 | {NULL, NULL} // sentinel |
395 | @@ -2520,7 +2517,7 @@ static int m_PDFDoc_getDocInfo(lua_State | | 413 | @@ -2520,7 +2517,7 @@ static int m_PDFDoc_getDocInfo(lua_State |
396 | if (((PdfDocument *) uin->d)->doc->getXRef()->isOk()) { | | 414 | if (((PdfDocument *) uin->d)->doc->getXRef()->isOk()) { |
397 | uout = new_Object_userdata(L); | | 415 | uout = new_Object_userdata(L); |
398 | uout->d = new Object(); | | 416 | uout->d = new Object(); |
399 | - ((PdfDocument *) uin->d)->doc->getDocInfo((Object *) uout->d); | | 417 | - ((PdfDocument *) uin->d)->doc->getDocInfo((Object *) uout->d); |