diff options
Diffstat (limited to 'src/deep.cpp')
-rw-r--r-- | src/deep.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/deep.cpp b/src/deep.cpp index 58da457..897dc63 100644 --- a/src/deep.cpp +++ b/src/deep.cpp | |||
@@ -304,10 +304,9 @@ char const* push_deep_proxy( Universe* U, lua_State* L, DeepPrelude* prelude, in | |||
304 | lua_getfield( L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); // DPC proxy metatable require() "module" _R._LOADED | 304 | lua_getfield( L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); // DPC proxy metatable require() "module" _R._LOADED |
305 | if( lua_istable( L, -1)) | 305 | if( lua_istable( L, -1)) |
306 | { | 306 | { |
307 | bool_t alreadyloaded; | ||
308 | lua_pushvalue( L, -2); // DPC proxy metatable require() "module" _R._LOADED "module" | 307 | lua_pushvalue( L, -2); // DPC proxy metatable require() "module" _R._LOADED "module" |
309 | lua_rawget( L, -2); // DPC proxy metatable require() "module" _R._LOADED module | 308 | lua_rawget( L, -2); // DPC proxy metatable require() "module" _R._LOADED module |
310 | alreadyloaded = lua_toboolean( L, -1); | 309 | int const alreadyloaded = lua_toboolean( L, -1); |
311 | if( !alreadyloaded) // not loaded | 310 | if( !alreadyloaded) // not loaded |
312 | { | 311 | { |
313 | int require_result; | 312 | int require_result; |
@@ -450,7 +449,7 @@ void* luaG_todeep( lua_State* L, luaG_IdFunction idfunc, int index) | |||
450 | * the id function of the copied value, or NULL for non-deep userdata | 449 | * the id function of the copied value, or NULL for non-deep userdata |
451 | * (not copied) | 450 | * (not copied) |
452 | */ | 451 | */ |
453 | bool_t copydeep( Universe* U, lua_State* L2, uint_t L2_cache_i, lua_State* L, uint_t i, LookupMode mode_, char const* upName_) | 452 | bool copydeep( Universe* U, lua_State* L2, uint_t L2_cache_i, lua_State* L, uint_t i, LookupMode mode_, char const* upName_) |
454 | { | 453 | { |
455 | char const* errmsg; | 454 | char const* errmsg; |
456 | luaG_IdFunction idfunc = get_idfunc( L, i, mode_); | 455 | luaG_IdFunction idfunc = get_idfunc( L, i, mode_); |
@@ -458,7 +457,7 @@ bool_t copydeep( Universe* U, lua_State* L2, uint_t L2_cache_i, lua_State* L, ui | |||
458 | 457 | ||
459 | if( idfunc == NULL) | 458 | if( idfunc == NULL) |
460 | { | 459 | { |
461 | return FALSE; // not a deep userdata | 460 | return false; // not a deep userdata |
462 | } | 461 | } |
463 | 462 | ||
464 | STACK_CHECK( L, 0); | 463 | STACK_CHECK( L, 0); |
@@ -497,5 +496,5 @@ bool_t copydeep( Universe* U, lua_State* L2, uint_t L2_cache_i, lua_State* L, ui | |||
497 | lua_State* errL = (mode_ == eLM_FromKeeper) ? L2 : L; | 496 | lua_State* errL = (mode_ == eLM_FromKeeper) ? L2 : L; |
498 | luaL_error( errL, errmsg); | 497 | luaL_error( errL, errmsg); |
499 | } | 498 | } |
500 | return TRUE; | 499 | return true; |
501 | } \ No newline at end of file | 500 | } \ No newline at end of file |