summaryrefslogtreecommitdiff
path: root/libs/lua/LuaBridge/detail/Namespace.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/lua/LuaBridge/detail/Namespace.h')
-rw-r--r--libs/lua/LuaBridge/detail/Namespace.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/lua/LuaBridge/detail/Namespace.h b/libs/lua/LuaBridge/detail/Namespace.h
index c859d8d151..590f25be4a 100644
--- a/libs/lua/LuaBridge/detail/Namespace.h
+++ b/libs/lua/LuaBridge/detail/Namespace.h
@@ -1070,7 +1070,9 @@ private:
PRINTDOC ("Ext C Function", _name << "set_table",
std::string(""), "int (*)(lua_State*)")
PRINTDOC("Member Function", _name << "sameinstance",
- std::string("bool"), std::string("void (*)(" + type_name <T>() + "*)"))
+ std::string("bool"), std::string("bool (*)(" + type_name <T>() + "*)"))
+ PRINTDOC("Member Function", _name << "offset",
+ std::string(type_name <T>() + "*"), std::string(type_name <T>() + "* (*)(unsigned int)"))
m_stackSize = parent->m_stackSize + 3;
parent->m_stackSize = 0;
@@ -1132,6 +1134,9 @@ private:
lua_pushcclosure (L, &CFunc::ClassEqualCheck <T>::f, 0);
rawsetfield (L, -3, "sameinstance");
+ lua_pushcclosure (L, &CFunc::offsetArray <T>, 0);
+ rawsetfield (L, -3, "offset"); // class table
+
}
else
{