From: John L. <jr...@us...> - 2007-12-20 02:27:28
|
Update of /cvsroot/wxlua/wxLua/bindings/wxlua In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8597/wxLua/bindings/wxlua Modified Files: override.hpp wxlua.i Log Message: - Removed wxluabind_removetableforcall(L) used in the bindings to determine if the function was called from the tables used for class constructors. It makes more sense to call an intermediatary function to remove the table before calling the real function. - Removed the wxLuaFunction class since we no longer need it. It was a userdata with a __call metatable to call the real function we want. We now push the actual function or an overload function helper with the wxLuaBindMethod struct as an upvalue to give better error messages. The new way should be faster since it doesn't generate as much garbage. - Added wxlua_argerror(L, stack_idx, type_str) to give a far more informative message from the bindings when the wrong type is an arg to a function. - Renamed WXLUAARG_XXX to WXLUA_TXXX to match LUA_TXXX. * Do not create a separate overload function in the bindings since we can just as easily check for multiple functions using the wxLuaBindMethod and call the generic overload function or just the single function. Index: wxlua.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/wxlua.i,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wxlua.i 15 Dec 2007 16:56:40 -0000 1.12 --- wxlua.i 20 Dec 2007 02:26:55 -0000 1.13 *************** *** 59,65 **** WXLUAMETHOD_STATIC // Class member function is static - WXLUAMETHOD_OVERLOAD // This is an overload function that will call others - // and the min/maxargs for it are not valid, - // but are the min and max of all functions WXLUAMETHOD_DELETE // This is the delete function that wxLua has generated --- 59,62 ---- *************** *** 73,87 **** %endenum ! %define WXLUAARG_None ! %define WXLUAARG_Nil ! %define WXLUAARG_Boolean ! %define WXLUAARG_LightUserData ! %define WXLUAARG_Number ! %define WXLUAARG_String ! %define WXLUAARG_Table ! %define WXLUAARG_Function ! %define WXLUAARG_UserData ! %define WXLUAARG_Thread ! %define WXLUAARG_Integer %define LUA_TNONE // (-1) --- 70,85 ---- %endenum ! %define WXLUA_TNONE ! %define WXLUA_TNIL ! %define WXLUA_TBOOLEAN ! %define WXLUA_TLIGHTUSERDATA ! %define WXLUA_TNUMBER ! %define WXLUA_TSTRING ! %define WXLUA_TTABLE ! %define WXLUA_TFUNCTION ! %define WXLUA_TUSERDATA ! %define WXLUA_TTHREAD ! %define WXLUA_TINTEGER ! %define WXLUA_TCFUNCTION %define LUA_TNONE // (-1) Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/override.hpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** override.hpp 15 Dec 2007 16:56:40 -0000 1.14 --- override.hpp 20 Dec 2007 02:26:55 -0000 1.15 *************** *** 698,702 **** static int LUACALL wxLua_wxLuaObject_constructor(lua_State *L) { - wxluabind_removetableforcall(L); wxLuaState wxlState(L); --- 698,701 ---- |