From 042055968ab0c48faec607889814e38c50c09efa Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Fri, 4 Jul 2025 13:50:53 +0200 Subject: Changed lua wrapper prefixes from luaG_ to luaW_ (w as in wrapper!) --- src/lindafactory.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/lindafactory.cpp') diff --git a/src/lindafactory.cpp b/src/lindafactory.cpp index 4eab0c1..483037f 100644 --- a/src/lindafactory.cpp +++ b/src/lindafactory.cpp @@ -47,22 +47,22 @@ void LindaFactory::createMetatable(lua_State* L_) const lua_newtable(L_); // L_: mt // protect metatable from external access - luaG_pushstring(L_, kLindaMetatableName); // L_: mt "" + luaW_pushstring(L_, kLindaMetatableName); // L_: mt "" lua_setfield(L_, -2, "__metatable"); // L_: mt // the linda functions - luaG_registerlibfuncs(L_, mLindaMT); + luaW_registerlibfuncs(L_, mLindaMT); kNilSentinel.pushKey(L_); // L_: mt kNilSentinel lua_setfield(L_, -2, "null"); // L_: mt // if the metatable contains __index, leave it as is - if (luaG_getfield(L_, kIdxTop, kIndex) != LuaType::NIL) { // L_: mt __index + if (luaW_getfield(L_, kIdxTop, kIndex) != LuaType::NIL) { // L_: mt __index lua_pop(L_, 1); // L_: mt __index } else { // metatable is its own index lua_pushvalue(L_, kIdxTop); // L_: mt mt - luaG_setfield(L_, StackIndex{ -2 }, kIndex); // L_: mt + luaW_setfield(L_, StackIndex{ -2 }, kIndex); // L_: mt } STACK_CHECK(L_, 1); @@ -110,7 +110,7 @@ DeepPrelude* LindaFactory::newDeepObjectInternal(lua_State* const L_) const { STACK_CHECK_START_REL(L_, 0); // we always expect name, wake_period, group at the bottom of the stack (either can be nil). any extra stuff we ignore and keep unmodified - std::string_view _linda_name{ luaG_tostring(L_, StackIndex{ 1 }) }; + std::string_view _linda_name{ luaW_tostring(L_, StackIndex{ 1 }) }; auto const _wake_period{ static_cast(lua_tonumber(L_, 2)) }; LindaGroup const _linda_group{ static_cast(lua_tointeger(L_, 3)) }; @@ -119,12 +119,12 @@ DeepPrelude* LindaFactory::newDeepObjectInternal(lua_State* const L_) const lua_Debug _ar; if (lua_getstack(L_, 1, &_ar) == 1) { // 1 because we want the name of the function that called lanes.linda (where we currently are) lua_getinfo(L_, "Sln", &_ar); - _linda_name = luaG_pushstring(L_, "%s:%d", _ar.short_src, _ar.currentline); + _linda_name = luaW_pushstring(L_, "%s:%d", _ar.short_src, _ar.currentline); } else { - _linda_name = luaG_pushstring(L_, ""); + _linda_name = luaW_pushstring(L_, ""); } // since the name is not empty, it is at slot 1, and we can replace "auto" with the result, just in case - LUA_ASSERT(L_, luaG_tostring(L_, StackIndex{ 1 }) == "auto"); + LUA_ASSERT(L_, luaW_tostring(L_, StackIndex{ 1 }) == "auto"); lua_replace(L_, 1); } -- cgit v1.2.3-55-g6feb