aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--deep_test/deep_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/deep_test/deep_test.cpp b/deep_test/deep_test.cpp
index 17c398a..0c7ed0f 100644
--- a/deep_test/deep_test.cpp
+++ b/deep_test/deep_test.cpp
@@ -56,7 +56,7 @@ static int deep_gc(lua_State* const L_)
56{ 56{
57 MyDeepUserdata* const _self{ static_cast<MyDeepUserdata*>(MyDeepFactory::Instance.toDeep(L_, StackIndex{ 1 })) }; 57 MyDeepUserdata* const _self{ static_cast<MyDeepUserdata*>(MyDeepFactory::Instance.toDeep(L_, StackIndex{ 1 })) };
58 luaL_argcheck(L_, 1, !_self->inUse.load(), "being collected while in use!"); 58 luaL_argcheck(L_, 1, !_self->inUse.load(), "being collected while in use!");
59 if (lua_getiuservalue(L_, -1, 1) == LUA_TFUNCTION) { 59 if (lua_getiuservalue(L_, kIdxTop, UserValueIndex{ 1 }) == LUA_TFUNCTION) {
60 lua_call(L_, 0, 0); 60 lua_call(L_, 0, 0);
61 } 61 }
62 return 0; 62 return 0;
@@ -240,7 +240,7 @@ static int clonable_tostring(lua_State* L)
240static int clonable_gc(lua_State* const L_) 240static int clonable_gc(lua_State* const L_)
241{ 241{
242 MyClonableUserdata* self = static_cast<MyClonableUserdata*>(lua_touserdata(L_, 1)); 242 MyClonableUserdata* self = static_cast<MyClonableUserdata*>(lua_touserdata(L_, 1));
243 if (lua_getiuservalue(L_, -1, 1) == LUA_TFUNCTION) { 243 if (lua_getiuservalue(L_, kIdxTop, UserValueIndex{ 1 }) == LUA_TFUNCTION) {
244 lua_call(L_, 0, 0); 244 lua_call(L_, 0, 0);
245 } 245 }
246 return 0; 246 return 0;