xref: /OK3568_Linux_fs/buildroot/package/lbase64/0001-retro-compatible-with-Lua-5.1.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1retro compatible with Lua 5.1 C/API
2
3Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
4
5Index: b/lbase64.c
6===================================================================
7--- a/lbase64.c
8+++ b/lbase64.c
9@@ -111,7 +111,11 @@
10
11 LUALIB_API int luaopen_base64(lua_State *L)
12 {
13+#if LUA_VERSION_NUM >= 502
14  luaL_newlib(L,R);
15+#else
16+ luaL_register(L,MYNAME,R);
17+#endif
18  lua_pushliteral(L,"version");			/** version */
19  lua_pushliteral(L,MYVERSION);
20  lua_settable(L,-3);
21