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/compat.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/compat.cpp') diff --git a/src/compat.cpp b/src/compat.cpp index 7e90142..08f22ca 100644 --- a/src/compat.cpp +++ b/src/compat.cpp @@ -5,10 +5,10 @@ // ################################################################################################# -UserValueCount luaG_getalluservalues(lua_State* const L_, StackIndex const idx_) +UserValueCount luaW_getalluservalues(lua_State* const L_, StackIndex const idx_) { STACK_CHECK_START_REL(L_, 0); - StackIndex const _idx{ luaG_absindex(L_, idx_) }; + StackIndex const _idx{ luaW_absindex(L_, idx_) }; UserValueIndex _nuv{ 0 }; do { // we don't know how many uservalues we are going to extract, there might be a lot... @@ -24,15 +24,15 @@ UserValueCount luaG_getalluservalues(lua_State* const L_, StackIndex const idx_) // ################################################################################################# // a small helper to obtain a module's table from the registry instead of relying on the presence of _G[""] -LuaType luaG_getmodule(lua_State* const L_, std::string_view const& name_) +LuaType luaW_getmodule(lua_State* const L_, std::string_view const& name_) { STACK_CHECK_START_REL(L_, 0); - LuaType _type{ luaG_getfield(L_, kIdxRegistry, LUA_LOADED_TABLE) }; // L_: _R._LOADED|nil + LuaType _type{ luaW_getfield(L_, kIdxRegistry, LUA_LOADED_TABLE) }; // L_: _R._LOADED|nil if (_type != LuaType::TABLE) { // L_: _R._LOADED|nil STACK_CHECK(L_, 1); return _type; } - _type = luaG_getfield(L_, kIdxTop, name_); // L_: _R._LOADED {module}|nil + _type = luaW_getfield(L_, kIdxTop, name_); // L_: _R._LOADED {module}|nil lua_remove(L_, -2); // L_: {module}|nil STACK_CHECK(L_, 1); return _type; @@ -52,7 +52,7 @@ int luaL_getsubtable(lua_State* const L_, StackIndex const idx_, char const* fna return 1; /* table already there */ } else { lua_pop(L_, 1); /* remove previous result */ - StackIndex const _absidx{ luaG_absindex(L_, idx_) }; + StackIndex const _absidx{ luaW_absindex(L_, idx_) }; lua_newtable(L_); lua_pushvalue(L_, -1); /* copy to be left at top */ lua_setfield(L_, _absidx, fname_); /* assign new table to field */ -- cgit v1.2.3-55-g6feb