moonbridge
changeset 89:c4fd976d9537
Register I/O library as moonbridge_io (and not mapping functions into io)
author | jbe |
---|---|
date | Tue Apr 07 02:52:24 2015 +0200 (2015-04-07) |
parents | fca51922b708 |
children | 54e6104c70a6 |
files | moonbridge.c |
line diff
1.1 --- a/moonbridge.c Tue Apr 07 02:15:17 2015 +0200 1.2 +++ b/moonbridge.c Tue Apr 07 02:52:24 2015 +0200 1.3 @@ -2465,14 +2465,8 @@ 1.4 lua_pushliteral(L, MOONBR_VERSION_STRING); 1.5 lua_setglobal(L, "_MOONBRIDGE_VERSION"); 1.6 luaL_openlibs(L); 1.7 - luaL_requiref(L, "moonbridge_io", luaopen_moonbridge_io, 0); 1.8 - lua_getglobal(L, "io"); 1.9 - for (lua_pushnil(L); lua_next(L, -3); lua_pop(L, 1)) { 1.10 - lua_pushvalue(L, -2); 1.11 - lua_pushvalue(L, -2); 1.12 - lua_settable(L, -5); 1.13 - } 1.14 - lua_pop(L, 2); 1.15 + luaL_requiref(L, "moonbridge_io", luaopen_moonbridge_io, 1); 1.16 + lua_pop(L, 1); 1.17 #ifdef MOONBR_LUA_PATH 1.18 moonbr_modify_path(L, "path", MOONBR_LUA_PATH); 1.19 #endif