diff options
author | Ferenc Wágner <wferi@niif.hu> | 2013-10-14 19:45:25 +0200 |
---|---|---|
committer | Ferenc Wágner <wferi@niif.hu> | 2014-03-01 17:40:35 +0100 |
commit | f4bbf85ee5224ab5f29ff7ca900c6f25437eed07 (patch) | |
tree | 2eb093c8b980f2a811bb57f6c15a333bd847ebd7 | |
parent | 7b5128075df5444fbc462175f5f05140e240efe9 (diff) | |
download | syslinux-f4bbf85ee5224ab5f29ff7ca900c6f25437eed07.tar.gz |
lua: also reactivate the cpu, dhcp, dmi, pci and vesa extension modules
And document the change in usage.
-rw-r--r-- | com32/lua/doc/syslinux.asc | 6 | ||||
-rw-r--r-- | com32/lua/src/Makefile | 5 | ||||
-rw-r--r-- | com32/lua/src/cpu.c | 2 | ||||
-rw-r--r-- | com32/lua/src/dhcp.c | 4 | ||||
-rw-r--r-- | com32/lua/src/dmi.c | 2 | ||||
-rw-r--r-- | com32/lua/src/pci.c | 4 | ||||
-rw-r--r-- | com32/lua/src/vesa.c | 4 |
7 files changed, 19 insertions, 8 deletions
diff --git a/com32/lua/doc/syslinux.asc b/com32/lua/doc/syslinux.asc index 64dc18c5..424c51f1 100644 --- a/com32/lua/doc/syslinux.asc +++ b/com32/lua/doc/syslinux.asc @@ -20,6 +20,12 @@ APPEND /testit.lua Modules ------- +Modules must be explicitly loaded into the namespace +before use, for example: +...................................................... +syslinux = require ("syslinux") +...................................................... + SYSLINUX ~~~~~~~~ diff --git a/com32/lua/src/Makefile b/com32/lua/src/Makefile index e757396b..20650efd 100644 --- a/com32/lua/src/Makefile +++ b/com32/lua/src/Makefile @@ -25,8 +25,13 @@ LNXLIBS = CFLAGS += -DSYSLINUX MODULES = lua.c32 +MODULES += cpu.c32 +MODULES += dhcp.c32 +MODULES += dmi.c32 MODULES += lfs.c32 +MODULES += pci.c32 MODULES += syslinux.c32 +MODULES += vesa.c32 TESTFILES = OBJS = lua.o diff --git a/com32/lua/src/cpu.c b/com32/lua/src/cpu.c index 6ef4e5a3..69914f79 100644 --- a/com32/lua/src/cpu.c +++ b/com32/lua/src/cpu.c @@ -152,7 +152,7 @@ static const luaL_Reg cpulib[] = { LUALIB_API int luaopen_cpu(lua_State *L) { - luaL_openlib(L, LUA_CPULIBNAME, cpulib, 0); + luaL_newlib(L, cpulib); return 1; } diff --git a/com32/lua/src/dhcp.c b/com32/lua/src/dhcp.c index af948131..14a39348 100644 --- a/com32/lua/src/dhcp.c +++ b/com32/lua/src/dhcp.c @@ -346,13 +346,13 @@ static int dhcp_gettable(lua_State *L) return 1; } -static const luaL_reg dhcplib[] = { +static const luaL_Reg dhcplib[] = { {"gettable", dhcp_gettable}, {"getoptions", dhcp_getoptions}, {NULL, NULL} }; LUALIB_API int luaopen_dhcp (lua_State *L) { - luaL_openlib(L, LUA_DHCPLIBNAME, dhcplib, 0); + luaL_newlib(L, dhcplib); return 1; } diff --git a/com32/lua/src/dmi.c b/com32/lua/src/dmi.c index 984fb60c..aa38df3a 100644 --- a/com32/lua/src/dmi.c +++ b/com32/lua/src/dmi.c @@ -519,7 +519,7 @@ static const luaL_Reg dmilib[] = { LUALIB_API int luaopen_dmi (lua_State *L) { - luaL_openlib(L, LUA_DMILIBNAME, dmilib, 0); + luaL_newlib(L, dmilib); return 1; } diff --git a/com32/lua/src/pci.c b/com32/lua/src/pci.c index c367ba9a..964020ff 100644 --- a/com32/lua/src/pci.c +++ b/com32/lua/src/pci.c @@ -160,7 +160,7 @@ static int pci_getidlist(lua_State *L) return(1); } -static const luaL_reg pcilib[] = { +static const luaL_Reg pcilib[] = { {"getinfo", pci_getinfo}, {"getidlist", pci_getidlist}, {NULL, NULL} @@ -169,7 +169,7 @@ static const luaL_reg pcilib[] = { /* This defines a function that opens up your library. */ LUALIB_API int luaopen_pci (lua_State *L) { - luaL_openlib(L, LUA_PCILIBNAME, pcilib, 0); + luaL_newlib(L, pcilib); return 1; } diff --git a/com32/lua/src/vesa.c b/com32/lua/src/vesa.c index 19a10242..28e01246 100644 --- a/com32/lua/src/vesa.c +++ b/com32/lua/src/vesa.c @@ -123,7 +123,7 @@ static int vesa_load_background(lua_State *L) return 0; } -static const luaL_reg vesalib[] = { +static const luaL_Reg vesalib[] = { {"getmodes", vesa_getmodes}, {"setmode", vesa_setmode}, {"load_background", vesa_load_background}, @@ -133,7 +133,7 @@ static const luaL_reg vesalib[] = { /* This defines a function that opens up your library. */ LUALIB_API int luaopen_vesa (lua_State *L) { - luaL_openlib(L, LUA_VESALIBNAME, vesalib, 0); + luaL_newlib(L, vesalib); return 1; } |