aboutsummaryrefslogtreecommitdiff
path: root/src/lindafactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lindafactory.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lindafactory.cpp b/src/lindafactory.cpp
index d5ebc9b..e5903fb 100644
--- a/src/lindafactory.cpp
+++ b/src/lindafactory.cpp
@@ -80,7 +80,7 @@ void LindaFactory::deleteDeepObjectInternal(lua_State* L_, DeepPrelude* o_) cons
80 Keeper* const _keeper{ _need_acquire_release ? _linda->acquireKeeper() : _myKeeper }; 80 Keeper* const _keeper{ _need_acquire_release ? _linda->acquireKeeper() : _myKeeper };
81 LUA_ASSERT(L_, _keeper == _myKeeper); // should always be the same 81 LUA_ASSERT(L_, _keeper == _myKeeper); // should always be the same
82 // hopefully this won't ever raise an error as we would jump to the closest pcall site while forgetting to release the keeper mutex... 82 // hopefully this won't ever raise an error as we would jump to the closest pcall site while forgetting to release the keeper mutex...
83 [[maybe_unused]] KeeperCallResult const result{ keeper_call(_keeper->K, KEEPER_API(destruct), L_, _linda, 0) }; 83 [[maybe_unused]] KeeperCallResult const result{ keeper_call(_keeper->K, KEEPER_API(destruct), L_, _linda, StackIndex{ 0 }) };
84 LUA_ASSERT(L_, result.has_value() && result.value() == 0); 84 LUA_ASSERT(L_, result.has_value() && result.value() == 0);
85 if (_need_acquire_release) { 85 if (_need_acquire_release) {
86 _linda->releaseKeeper(_keeper); 86 _linda->releaseKeeper(_keeper);
@@ -105,7 +105,7 @@ std::string_view LindaFactory::moduleName() const
105DeepPrelude* LindaFactory::newDeepObjectInternal(lua_State* const L_) const 105DeepPrelude* LindaFactory::newDeepObjectInternal(lua_State* const L_) const
106{ 106{
107 // we always expect name and group at the bottom of the stack (either can be nil). any extra stuff we ignore and keep unmodified 107 // we always expect name and group at the bottom of the stack (either can be nil). any extra stuff we ignore and keep unmodified
108 std::string_view _linda_name{ luaG_tostring(L_, 1) }; 108 std::string_view _linda_name{ luaG_tostring(L_, StackIndex{ 1 }) };
109 LindaGroup _linda_group{ static_cast<int>(lua_tointeger(L_, 2)) }; 109 LindaGroup _linda_group{ static_cast<int>(lua_tointeger(L_, 2)) };
110 110
111 // store in the linda the location of the script that created it 111 // store in the linda the location of the script that created it
@@ -118,7 +118,7 @@ DeepPrelude* LindaFactory::newDeepObjectInternal(lua_State* const L_) const
118 _linda_name = luaG_pushstring(L_, "<unresolved>"); 118 _linda_name = luaG_pushstring(L_, "<unresolved>");
119 } 119 }
120 // since the name is not empty, it is at slot 1, and we can replace "auto" with the result, just in case 120 // since the name is not empty, it is at slot 1, and we can replace "auto" with the result, just in case
121 LUA_ASSERT(L_, luaG_tostring(L_, 1) == "auto"); 121 LUA_ASSERT(L_, luaG_tostring(L_, StackIndex{ 1 }) == "auto");
122 lua_replace(L_, 1); 122 lua_replace(L_, 1);
123 } 123 }
124 124