diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/deep.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/deep.cpp b/src/deep.cpp index bc0b73c..c1ef30e 100644 --- a/src/deep.cpp +++ b/src/deep.cpp | |||
| @@ -112,13 +112,13 @@ int DeepFactory::DeepGC(lua_State* const L_) | |||
| 112 | 112 | ||
| 113 | if (_isLastRef) { | 113 | if (_isLastRef) { |
| 114 | // retrieve wrapped __gc, if any | 114 | // retrieve wrapped __gc, if any |
| 115 | lua_pushvalue(L_, lua_upvalueindex(1)); // L_: self __gc? | 115 | lua_pushvalue(L_, lua_upvalueindex(1)); // L_: self __gc? |
| 116 | if (!lua_isnil(L_, -1)) { | 116 | if (!lua_isnil(L_, -1)) { |
| 117 | lua_insert(L_, -2); // L_: __gc self | 117 | lua_insert(L_, -2); // L_: __gc self |
| 118 | lua_call(L_, 1, 0); // L_: | 118 | lua_call(L_, 1, 0); // L_: |
| 119 | } else { | 119 | } else { |
| 120 | // need an empty stack in case we are GC_ing from a Keeper, so that empty stack checks aren't triggered | 120 | // need an empty stack in case we are GC_ing from a Keeper, so that empty stack checks aren't triggered |
| 121 | lua_pop(L_, 2); // L_: | 121 | lua_pop(L_, 2); // L_: |
| 122 | } | 122 | } |
| 123 | DeleteDeepObject(L_, _p); | 123 | DeleteDeepObject(L_, _p); |
| 124 | } | 124 | } |
