aboutsummaryrefslogtreecommitdiff
path: root/src/compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compat.c')
-rw-r--r--src/compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compat.c b/src/compat.c
index 1a66f38..c5e29f5 100644
--- a/src/compat.c
+++ b/src/compat.c
@@ -30,7 +30,7 @@ void luaL_requiref (lua_State *L, const char *modname, lua_CFunction openf, int
30 lua_pushcfunction(L, openf); 30 lua_pushcfunction(L, openf);
31 lua_pushstring(L, modname); /* argument to open function */ 31 lua_pushstring(L, modname); /* argument to open function */
32 lua_call(L, 1, 1); /* open module */ 32 lua_call(L, 1, 1); /* open module */
33 luaL_getsubtable(L, LUA_REGISTRYINDEX, "_LOADED"); 33 luaL_getsubtable(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE);
34 lua_pushvalue(L, -2); /* make copy of module (call result) */ 34 lua_pushvalue(L, -2); /* make copy of module (call result) */
35 lua_setfield(L, -2, modname); /* _LOADED[modname] = module */ 35 lua_setfield(L, -2, modname); /* _LOADED[modname] = module */
36 lua_pop(L, 1); /* remove _LOADED table */ 36 lua_pop(L, 1); /* remove _LOADED table */