On Tue, Aug 11, 2015 at 6:45 PM, Marcel F. Krüger <zauguin@gmail.com> wrote:
Hi,


according to the documentation you should be able to call `pdf.reserveobj("annot")`, but doing so results in the error "pdf.reserveobj() optional string must be "annot"". The problem is that a null pointer and not the argument is compared to "annot".
According to the website, you are not ready for contributions yet, but I still attached a patch.


--
Marcel Krüger

---
source/texk/web2c/luatexdir/lua/lpdflib.c | 1 +
1 file changed, 1 insertion(+)


diff --git a/source/texk/web2c/luatexdir/lua/lpdflib.c b/source/texk/web2c/luatexdir/lua/lpdflib.c
index 7db3041..7158014 100644
--- a/source/texk/web2c/luatexdir/lua/lpdflib.c
+++ b/source/texk/web2c/luatexdir/lua/lpdflib.c
@@ -494,6 +494,7 @@ static int l_reserveobj(lua_State * L)
case 1:
if (!lua_isstring(L, -1))
luaL_error(L, "pdf.reserveobj() optional argument must be string");
+ st_s = luaL_checkstring(L, 1);
if (lua_key_eq(st_s, annot)) {
pdf_last_annot = pdf_create_obj(static_pdf, obj_type_annot, 0);
} else {


Thank you for the report --- can you give a mwe ? I will fix asap.


--
luigi