aboutsummaryrefslogtreecommitdiff
path: root/src/deep.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/deep.cpp')
-rw-r--r--src/deep.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/deep.cpp b/src/deep.cpp
index 3e1d90a..e4d090f 100644
--- a/src/deep.cpp
+++ b/src/deep.cpp
@@ -212,7 +212,7 @@ char const* DeepFactory::PushDeepProxy(Dest L, DeepPrelude* prelude, int nuv_, L
212 212
213 // a new full userdata, fitted with the specified number of uservalue slots (always 1 for Lua < 5.4) 213 // a new full userdata, fitted with the specified number of uservalue slots (always 1 for Lua < 5.4)
214 DeepPrelude** const proxy{ lua_newuserdatauv<DeepPrelude*>(L, nuv_) }; // DPC proxy 214 DeepPrelude** const proxy{ lua_newuserdatauv<DeepPrelude*>(L, nuv_) }; // DPC proxy
215 ASSERT_L(proxy); 215 LUA_ASSERT(L, proxy);
216 *proxy = prelude; 216 *proxy = prelude;
217 prelude->m_refcount.fetch_add(1, std::memory_order_relaxed); // one more proxy pointing to this deep data 217 prelude->m_refcount.fetch_add(1, std::memory_order_relaxed); // one more proxy pointing to this deep data
218 218
@@ -312,8 +312,8 @@ char const* DeepFactory::PushDeepProxy(Dest L, DeepPrelude* prelude, int nuv_, L
312 } 312 }
313 } 313 }
314 STACK_CHECK(L, 2); // DPC proxy metatable 314 STACK_CHECK(L, 2); // DPC proxy metatable
315 ASSERT_L(lua_type_as_enum(L, -2) == LuaType::USERDATA); 315 LUA_ASSERT(L, lua_type_as_enum(L, -2) == LuaType::USERDATA);
316 ASSERT_L(lua_istable( L, -1)); 316 LUA_ASSERT(L, lua_istable( L, -1));
317 lua_setmetatable( L, -2); // DPC proxy 317 lua_setmetatable( L, -2); // DPC proxy
318 318
319 // If we're here, we obviously had to create a new proxy, so cache it. 319 // If we're here, we obviously had to create a new proxy, so cache it.
@@ -321,7 +321,7 @@ char const* DeepFactory::PushDeepProxy(Dest L, DeepPrelude* prelude, int nuv_, L
321 lua_pushvalue( L, -2); // DPC proxy deep proxy 321 lua_pushvalue( L, -2); // DPC proxy deep proxy
322 lua_rawset( L, -4); // DPC proxy 322 lua_rawset( L, -4); // DPC proxy
323 lua_remove( L, -2); // proxy 323 lua_remove( L, -2); // proxy
324 ASSERT_L(lua_type_as_enum(L, -1) == LuaType::USERDATA); 324 LUA_ASSERT(L, lua_type_as_enum(L, -1) == LuaType::USERDATA);
325 STACK_CHECK(L, 0); 325 STACK_CHECK(L, 0);
326 return nullptr; 326 return nullptr;
327} 327}
@@ -361,8 +361,8 @@ int DeepFactory::pushDeepUserdata(Dest L, int nuv_) const
361 return luaL_error( L, "Bad Deep Factory: DEEP_VERSION is incorrect, rebuild your implementation with the latest deep implementation"); 361 return luaL_error( L, "Bad Deep Factory: DEEP_VERSION is incorrect, rebuild your implementation with the latest deep implementation");
362 } 362 }
363 363
364 ASSERT_L(prelude->m_refcount.load(std::memory_order_relaxed) == 0); // 'DeepFactory::PushDeepProxy' will lift it to 1 364 LUA_ASSERT(L, prelude->m_refcount.load(std::memory_order_relaxed) == 0); // 'DeepFactory::PushDeepProxy' will lift it to 1
365 ASSERT_L(&prelude->m_factory == this); 365 LUA_ASSERT(L, &prelude->m_factory == this);
366 366
367 if (lua_gettop( L) - oldtop != 0) 367 if (lua_gettop( L) - oldtop != 0)
368 { 368 {