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;
}
static const struct luaL_reg blitbuffer_func[] = {
static const struct luaL_Reg blitbuffer_func[] = {
{"new", newBlitBuffer},
{NULL, NULL}
};
static const struct luaL_reg blitbuffer_meth[] = {
static const struct luaL_Reg blitbuffer_meth[] = {
{"getWidth", getWidth},
{"getHeight", getHeight},
{"blitFrom", blitToBuffer},

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

@ -88,7 +88,7 @@ static int dcGetGamma(lua_State *L) {
return 1;
}
static const struct luaL_reg drawcontext_meth[] = {
static const struct luaL_Reg drawcontext_meth[] = {
{"setRotate", dcSetRotate},
{"getRotate", dcGetRotate},
{"setZoom", dcSetZoom},
@ -100,7 +100,7 @@ static const struct luaL_reg drawcontext_meth[] = {
{NULL, NULL}
};
static const struct luaL_reg drawcontext_func[] = {
static const struct luaL_Reg drawcontext_func[] = {
{"new", newDrawContext},
{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},
{NULL, NULL}
};
static const struct luaL_reg einkfb_meth[] = {
static const struct luaL_Reg einkfb_meth[] = {
{"close", closeFrameBuffer},
{"__gc", closeFrameBuffer},
{"refresh", einkUpdate},

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

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

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

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

Loading…
Cancel
Save