diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2014-04-02 20:46:06 +0200 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2014-04-02 20:46:06 +0200 |
commit | bfd0179042b0b02fb88748d54e56e7e208bb117f (patch) | |
tree | 42d5fd51574054caaf673420fca1ec962d62d2f2 /apps/plugins/lua/rocklua.c | |
parent | 36378988ad4059982742f05f5eb50580b456840a (diff) | |
download | rockbox-bfd0179042b0b02fb88748d54e56e7e208bb117f.tar.gz rockbox-bfd0179042b0b02fb88748d54e56e7e208bb117f.zip |
Revert "Update lua plugin to 5.2.3"
FILE typedef to *void needs more work to not break sim and
application builds. I checked only a few random native builds
unfortunately. Sorry for inconvenience.
Diffstat (limited to 'apps/plugins/lua/rocklua.c')
-rw-r--r-- | apps/plugins/lua/rocklua.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/plugins/lua/rocklua.c b/apps/plugins/lua/rocklua.c index 4f328dd84a..5539618a43 100644 --- a/apps/plugins/lua/rocklua.c +++ b/apps/plugins/lua/rocklua.c | |||
@@ -26,8 +26,7 @@ | |||
26 | #include "rocklib.h" | 26 | #include "rocklib.h" |
27 | #include "luadir.h" | 27 | #include "luadir.h" |
28 | 28 | ||
29 | #undef LUA_BITLIBNAME | 29 | |
30 | #define LUA_BITLIBNAME "bit" | ||
31 | 30 | ||
32 | static const luaL_Reg lualibs[] = { | 31 | static const luaL_Reg lualibs[] = { |
33 | {"", luaopen_base}, | 32 | {"", luaopen_base}, |
@@ -35,7 +34,7 @@ static const luaL_Reg lualibs[] = { | |||
35 | {LUA_STRLIBNAME, luaopen_string}, | 34 | {LUA_STRLIBNAME, luaopen_string}, |
36 | {LUA_OSLIBNAME, luaopen_os}, | 35 | {LUA_OSLIBNAME, luaopen_os}, |
37 | {LUA_ROCKLIBNAME, luaopen_rock}, | 36 | {LUA_ROCKLIBNAME, luaopen_rock}, |
38 | {LUA_BITLIBNAME, luaopen_bit32}, | 37 | {LUA_BITLIBNAME, luaopen_bit}, |
39 | {LUA_IOLIBNAME, luaopen_io}, | 38 | {LUA_IOLIBNAME, luaopen_io}, |
40 | {LUA_LOADLIBNAME, luaopen_package}, | 39 | {LUA_LOADLIBNAME, luaopen_package}, |
41 | {LUA_MATHLIBNAME, luaopen_math}, | 40 | {LUA_MATHLIBNAME, luaopen_math}, |
@@ -44,10 +43,11 @@ static const luaL_Reg lualibs[] = { | |||
44 | }; | 43 | }; |
45 | 44 | ||
46 | static void rocklua_openlibs(lua_State *L) { | 45 | static void rocklua_openlibs(lua_State *L) { |
47 | const luaL_Reg *lib; | 46 | const luaL_Reg *lib = lualibs; |
48 | for (lib = lualibs; lib->func; lib++) { | 47 | for (; lib->func; lib++) { |
49 | luaL_requiref(L, lib->name, lib->func, 1); | 48 | lua_pushcfunction(L, lib->func); |
50 | lua_pop(L, 1); /* remove lib */ | 49 | lua_pushstring(L, lib->name); |
50 | lua_call(L, 1, 0); | ||
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||