[syslinux:master] lua: reactivate the syslinux extension module

syslinux-bot for Ferenc Wágner wferi at niif.hu
Sun Mar 2 13:48:23 PST 2014


Commit-ID:  4bbaf68cbf6c9a4c850f71b19bfb9604b9327efb
Gitweb:     http://www.syslinux.org/commit/4bbaf68cbf6c9a4c850f71b19bfb9604b9327efb
Author:     Ferenc Wágner <wferi at niif.hu>
AuthorDate: Sun, 13 Oct 2013 22:30:16 +0200
Committer:  Ferenc Wágner <wferi at niif.hu>
CommitDate: Sat, 1 Mar 2014 17:40:35 +0100

lua: reactivate the syslinux extension module

Under Lua 5.2 modules are not expected to set global variables
to reduce namespace pollution. Explicit require() is preferred.

---
 com32/lua/src/Makefile   | 1 +
 com32/lua/src/syslinux.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/com32/lua/src/Makefile b/com32/lua/src/Makefile
index 070db90..e757396 100644
--- a/com32/lua/src/Makefile
+++ b/com32/lua/src/Makefile
@@ -26,6 +26,7 @@ LNXLIBS	   =
 CFLAGS    += -DSYSLINUX
 MODULES	  = lua.c32
 MODULES   += lfs.c32
+MODULES   += syslinux.c32
 TESTFILES =
 
 OBJS	  = lua.o
diff --git a/com32/lua/src/syslinux.c b/com32/lua/src/syslinux.c
index afcdcaa..9983233 100644
--- a/com32/lua/src/syslinux.c
+++ b/com32/lua/src/syslinux.c
@@ -473,7 +473,7 @@ static int sl_version(lua_State * L)
     return 1;
 }
 
-static const luaL_reg syslinuxlib[] = {
+static const luaL_Reg syslinuxlib[] = {
     {"run_command", sl_run_command},
     {"run_default", sl_run_default},
     {"local_boot", sl_local_boot},
@@ -504,6 +504,6 @@ LUALIB_API int luaopen_syslinux(lua_State * L)
 
     luaL_newmetatable(L, SYSLINUX_FILE);
 
-    luaL_openlib(L, LUA_SYSLINUXLIBNAME, syslinuxlib, 0);
+    luaL_newlib(L, syslinuxlib);
     return 1;
 }


More information about the Syslinux-commits mailing list