aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerenc Wágner <wferi@niif.hu>2013-10-13 22:30:16 +0200
committerFerenc Wágner <wferi@niif.hu>2014-03-01 17:40:35 +0100
commit4bbaf68cbf6c9a4c850f71b19bfb9604b9327efb (patch)
treee43fa9a42f6c1a2a49b2ffa48eb2873a3df59a49
parent6fe3d82ce60b181edf612fc8a106413c8e112065 (diff)
downloadsyslinux-4bbaf68cbf6c9a4c850f71b19bfb9604b9327efb.tar.gz
syslinux-4bbaf68cbf6c9a4c850f71b19bfb9604b9327efb.tar.xz
syslinux-4bbaf68cbf6c9a4c850f71b19bfb9604b9327efb.zip
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.
-rw-r--r--com32/lua/src/Makefile1
-rw-r--r--com32/lua/src/syslinux.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/com32/lua/src/Makefile b/com32/lua/src/Makefile
index 070db90b..e757396b 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 afcdcaad..99832330 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;
}