aboutsummaryrefslogtreecommitdiff
path: root/src/deep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/deep.c')
-rw-r--r--src/deep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/deep.c b/src/deep.c
index a486a72..fd92e0c 100644
--- a/src/deep.c
+++ b/src/deep.c
@@ -347,13 +347,13 @@ char const* push_deep_proxy( Universe* U, lua_State* L, DeepPrelude* prelude, Lo
347 } 347 }
348 if( NULL != modname) // we actually got a module name 348 if( NULL != modname) // we actually got a module name
349 { 349 {
350 // somehow, L.registry._LOADED can exist without having registered the 'package' library. 350 // L.registry._LOADED exists without having registered the 'package' library.
351 lua_getglobal( L, "require"); // DPC proxy metatable require() 351 lua_getglobal( L, "require"); // DPC proxy metatable require()
352 // check that the module is already loaded (or being loaded, we are happy either way) 352 // check that the module is already loaded (or being loaded, we are happy either way)
353 if( lua_isfunction( L, -1)) 353 if( lua_isfunction( L, -1))
354 { 354 {
355 lua_pushstring( L, modname); // DPC proxy metatable require() "module" 355 lua_pushstring( L, modname); // DPC proxy metatable require() "module"
356 lua_getfield( L, LUA_REGISTRYINDEX, "_LOADED"); // DPC proxy metatable require() "module" _R._LOADED 356 lua_getfield( L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); // DPC proxy metatable require() "module" _R._LOADED
357 if( lua_istable( L, -1)) 357 if( lua_istable( L, -1))
358 { 358 {
359 bool_t alreadyloaded; 359 bool_t alreadyloaded;