Skip to content

Commit 74774cb

Browse files
committed
Merge branch 'master' into dev/function_as_arguments
2 parents 947d6ca + a32f4e9 commit 74774cb

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

‎Distribution/LuaBridge/LuaBridge.h‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8556,6 +8556,15 @@ inline int newindex_metamethod(lua_State* L)
85568556
return *result;
85578557
}
85588558

8559+
if (auto result = try_call_parent_newindex_setters<IsObject>(L))
8560+
return *result;
8561+
8562+
if constexpr (IsObject)
8563+
{
8564+
if (auto result = try_call_instance_static_newindex(L, -1))
8565+
return *result;
8566+
}
8567+
85598568
if (auto result = try_call_parent_newindex_setters<IsObject>(L))
85608569
return *result;
85618570

@@ -11858,6 +11867,20 @@ class LuaRef : public LuaRefBase<LuaRef, LuaRef>
1185811867
lua_pop(m_L, 1);
1185911868
}
1186011869

11870+
const void* getPointer() const
11871+
{
11872+
#if LUABRIDGE_SAFE_STACK_CHECKS
11873+
if (! lua_checkstack(m_L, 1))
11874+
return nullptr;
11875+
#endif
11876+
11877+
lua_rawgeti(m_L, LUA_REGISTRYINDEX, m_ref);
11878+
const void* ptr = lua_topointer(m_L, -1);
11879+
lua_pop(m_L, 1);
11880+
11881+
return ptr;
11882+
}
11883+
1186111884
[[nodiscard]] std::size_t hash() const
1186211885
{
1186311886
#if LUABRIDGE_SAFE_STACK_CHECKS

0 commit comments

Comments
 (0)