summaryrefslogtreecommitdiff
path: root/libs/lua/LuaBridge/detail/CFunctions.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/lua/LuaBridge/detail/CFunctions.h')
-rw-r--r--libs/lua/LuaBridge/detail/CFunctions.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/lua/LuaBridge/detail/CFunctions.h b/libs/lua/LuaBridge/detail/CFunctions.h
index 29b361b690..6f43919216 100644
--- a/libs/lua/LuaBridge/detail/CFunctions.h
+++ b/libs/lua/LuaBridge/detail/CFunctions.h
@@ -367,6 +367,19 @@ struct CFunc
};
template <class T>
+ struct ClassEqualCheck
+ {
+ static int f (lua_State* L)
+ {
+ T const* const t0 = Userdata::get <T> (L, 1, true);
+ T const* const t1 = Userdata::get <T> (L, 2, true);
+ Stack <bool>::push (L, t0 == t1);
+ return 1;
+ }
+ };
+
+
+ template <class T>
struct PtrNullCheck
{
static int f (lua_State* L)