summaryrefslogtreecommitdiffstats
path: root/package/lbase64/0001-retro-compatible-with-Lua-5.1.patch
blob: 12acf448309b6be2848c355b216bbbddec57b1ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
retro compatible with Lua 5.1 C/API

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>

Index: b/lbase64.c
===================================================================
--- a/lbase64.c
+++ b/lbase64.c
@@ -111,7 +111,11 @@
 
 LUALIB_API int luaopen_base64(lua_State *L)
 {
+#if LUA_VERSION_NUM >= 502
  luaL_newlib(L,R);
+#else
+ luaL_register(L,MYNAME,R);
+#endif
  lua_pushliteral(L,"version");			/** version */
  lua_pushliteral(L,MYVERSION);
  lua_settable(L,-3);
OpenPOWER on IntegriCloud