fix a Lua 5.0 syntax that was deprecated in 5.1

luaL_reg is now renamed to luaL_Reg. Lua 5.2 does not know about
the old name anymore, Lua 5.1.x had backward compatibility.
pull/2/merge
HW 12 years ago
parent 9ee7afa86d
commit 8869c52c31

@ -366,12 +366,12 @@ static int paintRect(lua_State *L) {
return 0; return 0;
} }
static const struct luaL_reg blitbuffer_func[] = { static const struct luaL_Reg blitbuffer_func[] = {
{"new", newBlitBuffer}, {"new", newBlitBuffer},
{NULL, NULL} {NULL, NULL}
}; };
static const struct luaL_reg blitbuffer_meth[] = { static const struct luaL_Reg blitbuffer_meth[] = {
{"getWidth", getWidth}, {"getWidth", getWidth},
{"getHeight", getHeight}, {"getHeight", getHeight},
{"blitFrom", blitToBuffer}, {"blitFrom", blitToBuffer},

@ -327,12 +327,12 @@ static int drawPage(lua_State *L) {
return 0; return 0;
} }
static const struct luaL_reg djvu_func[] = { static const struct luaL_Reg djvu_func[] = {
{"openDocument", openDocument}, {"openDocument", openDocument},
{NULL, NULL} {NULL, NULL}
}; };
static const struct luaL_reg djvudocument_meth[] = { static const struct luaL_Reg djvudocument_meth[] = {
{"openPage", openPage}, {"openPage", openPage},
{"getPages", getNumberOfPages}, {"getPages", getNumberOfPages},
{"getTOC", getTableOfContent}, {"getTOC", getTableOfContent},
@ -341,7 +341,7 @@ static const struct luaL_reg djvudocument_meth[] = {
{NULL, NULL} {NULL, NULL}
}; };
static const struct luaL_reg djvupage_meth[] = { static const struct luaL_Reg djvupage_meth[] = {
{"getSize", getPageSize}, {"getSize", getPageSize},
{"getUsedBBox", getUsedBBox}, {"getUsedBBox", getUsedBBox},
{"close", closePage}, {"close", closePage},

@ -88,7 +88,7 @@ static int dcGetGamma(lua_State *L) {
return 1; return 1;
} }
static const struct luaL_reg drawcontext_meth[] = { static const struct luaL_Reg drawcontext_meth[] = {
{"setRotate", dcSetRotate}, {"setRotate", dcSetRotate},
{"getRotate", dcGetRotate}, {"getRotate", dcGetRotate},
{"setZoom", dcSetZoom}, {"setZoom", dcSetZoom},
@ -100,7 +100,7 @@ static const struct luaL_reg drawcontext_meth[] = {
{NULL, NULL} {NULL, NULL}
}; };
static const struct luaL_reg drawcontext_func[] = { static const struct luaL_Reg drawcontext_func[] = {
{"new", newDrawContext}, {"new", newDrawContext},
{NULL, NULL} {NULL, NULL}
}; };

@ -203,12 +203,12 @@ static int einkSetOrientation(lua_State *L) {
} }
static const struct luaL_reg einkfb_func[] = { static const struct luaL_Reg einkfb_func[] = {
{"open", openFrameBuffer}, {"open", openFrameBuffer},
{NULL, NULL} {NULL, NULL}
}; };
static const struct luaL_reg einkfb_meth[] = { static const struct luaL_Reg einkfb_meth[] = {
{"close", closeFrameBuffer}, {"close", closeFrameBuffer},
{"__gc", closeFrameBuffer}, {"__gc", closeFrameBuffer},
{"refresh", einkUpdate}, {"refresh", einkUpdate},

@ -181,7 +181,7 @@ static int doneFace(lua_State *L) {
return 0; return 0;
} }
static const struct luaL_reg ft_face_meth[] = { static const struct luaL_Reg ft_face_meth[] = {
{"renderGlyph", renderGlyph}, {"renderGlyph", renderGlyph},
{"hasKerning", hasKerning}, {"hasKerning", hasKerning},
{"getKerning", getKerning}, {"getKerning", getKerning},
@ -190,7 +190,7 @@ static const struct luaL_reg ft_face_meth[] = {
{NULL, NULL} {NULL, NULL}
}; };
static const struct luaL_reg ft_func[] = { static const struct luaL_Reg ft_func[] = {
{"newFace", newFace}, {"newFace", newFace},
{"newBuiltinFace", newBuiltinFace}, {"newBuiltinFace", newBuiltinFace},
{NULL, NULL} {NULL, NULL}

@ -144,7 +144,7 @@ static int waitForInput(lua_State *L) {
#endif #endif
} }
static const struct luaL_reg input_func[] = { static const struct luaL_Reg input_func[] = {
{"open", openInputDevice}, {"open", openInputDevice},
{"closeAll", closeInputDevices}, {"closeAll", closeInputDevices},
{"waitForEvent", waitForInput}, {"waitForEvent", waitForInput},

@ -274,12 +274,12 @@ static int drawPage(lua_State *L) {
return 0; return 0;
} }
static const struct luaL_reg pdf_func[] = { static const struct luaL_Reg pdf_func[] = {
{"openDocument", openDocument}, {"openDocument", openDocument},
{NULL, NULL} {NULL, NULL}
}; };
static const struct luaL_reg pdfdocument_meth[] = { static const struct luaL_Reg pdfdocument_meth[] = {
{"openPage", openPage}, {"openPage", openPage},
{"getPages", getNumberOfPages}, {"getPages", getNumberOfPages},
{"getTOC", getTableOfContent}, {"getTOC", getTableOfContent},
@ -288,7 +288,7 @@ static const struct luaL_reg pdfdocument_meth[] = {
{NULL, NULL} {NULL, NULL}
}; };
static const struct luaL_reg pdfpage_meth[] = { static const struct luaL_Reg pdfpage_meth[] = {
{"getSize", getPageSize}, {"getSize", getPageSize},
{"getUsedBBox", getUsedBBox}, {"getUsedBBox", getUsedBBox},
{"close", closePage}, {"close", closePage},

@ -46,7 +46,7 @@ static int utf8charcode(lua_State *L) {
return 1; return 1;
} }
static const struct luaL_reg util_func[] = { static const struct luaL_Reg util_func[] = {
{"gettime", gettime}, {"gettime", gettime},
{"utf8charcode", utf8charcode}, {"utf8charcode", utf8charcode},
{NULL, NULL} {NULL, NULL}

Loading…
Cancel
Save