From 5ce610659adea3159549d4863c2479163fce89f4 Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Wed, 31 Jul 2013 11:31:38 -0700 Subject: Even further changes in the Lua class binding system. Simplifying the callback system by using the Lua's C closure mechanism. --- tests/test-Lua.cc | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'tests') diff --git a/tests/test-Lua.cc b/tests/test-Lua.cc index fec6f11..d4c3637 100644 --- a/tests/test-Lua.cc +++ b/tests/test-Lua.cc @@ -44,18 +44,9 @@ struct lua_functypes_t ObjectTest_functions[] = { { -1, 0, 0, 0, 0 }, }; -class sLua_ObjectTest { - public: - DECLARE_METHOD(ObjectTest, OBJECTTEST_SOMEMETHOD1); - DECLARE_METHOD(ObjectTest, OBJECTTEST_SOMEMETHOD2); - - DECLARE_CONSTRUCTOR(ObjectTest, OBJECTTEST_CONSTRUCTOR); - DECLARE_STATIC(ObjectTest, OBJECTTEST_SOMESTATIC); - DECLARE_FUNCTION(ObjectTest, OBJECTTEST_SOMEFUNCTION); - DECLARE_FUNCTION(ObjectTest, OBJECTTEST_YIELDTEST); - private: +struct sLua_ObjectTest { static int ObjectTest_proceed(Lua & L, int n, ObjectTest * obj, int caller); - static int ObjectTest_proceed_statics(Lua & L, int n, int caller) throw (GeneralException); + static int ObjectTest_proceed_static(Lua & L, int n, int caller) throw (GeneralException); }; class LuaObjectTestFactory : public LuaObjectFactory { @@ -99,7 +90,7 @@ int sLua_ObjectTest::ObjectTest_proceed(Lua & L, int n, ObjectTest * obj, int ca Events::Timeout * evt = NULL; -int sLua_ObjectTest::ObjectTest_proceed_statics(Lua & L, int n, int caller) throw (GeneralException) { +int sLua_ObjectTest::ObjectTest_proceed_static(Lua & L, int n, int caller) throw (GeneralException) { int y; switch (caller) { -- cgit v1.2.3