258d3cda3b
The author of lbase64 maintains 3 separate versions of the package for the 3 Lua versions. Only the 5.1 version is uploaded to luarocks, so that is the one we currently support in Buildroot. However, the three versions are nearly identical. With a small patch, this allows us to support all Lua versions from a single tarball. Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
21 lines
481 B
Diff
21 lines
481 B
Diff
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);
|