From: John L. <jr...@us...> - 2007-03-15 00:01:40
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15657/wxLua/modules/wxlua/include Modified Files: wxlbind.h wxldefs.h Log Message: Remove wxLua_AddTrackedObject functions and just use wxLuaState::AddTrackedObject directly Remove all gc (destructor, LuaDelete) functions from the methods of a class since we can delete the objects in the single gc function in wxlbind.cpp anyway. Index: wxldefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxldefs.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** wxldefs.h 26 Feb 2007 01:57:06 -0000 1.14 --- wxldefs.h 15 Mar 2007 00:01:25 -0000 1.15 *************** *** 49,53 **** //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 5 // ---------------------------------------------------------------------------- --- 49,53 ---- //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 6 // ---------------------------------------------------------------------------- Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** wxlbind.h 26 Feb 2007 05:17:29 -0000 1.36 --- wxlbind.h 15 Mar 2007 00:01:25 -0000 1.37 *************** *** 42,52 **** enum wxLuaMethod_Type // The type of a Lua method { ! LuaDelete = 1, // gc routine ! LuaConstructor = 2, // constructor ! LuaDestructor = 4, // destructor (not used) ! LuaMethod = 8, // class method ! LuaGlobal = 16, // global method (not really related to the class) ! LuaGetProp = 32, // Get %property funcName, read ! LuaSetProp = 64 // Set %property funcName, write }; --- 42,50 ---- enum wxLuaMethod_Type // The type of a Lua method { ! LuaConstructor = 1, // constructor ! LuaMethod = 2, // class method ! LuaGlobal = 4, // global method (not really related to the class) ! LuaGetProp = 8, // Get %property funcName, read ! LuaSetProp = 16 // Set %property funcName, write }; *************** *** 217,221 **** #define wxLUA_DECLARE_ENCAPSULATION(IMPEXPSYMBOL, className, objName) \ - IMPEXPSYMBOL void LUACALL wxLua_AddTrackedObject(wxLuaState& wxlState, className *); \ class IMPEXPSYMBOL wxObject_##objName : public wxObject \ { \ --- 215,218 ---- *************** *** 223,227 **** wxObject_##objName(className *p_##objName) : m_p##objName(p_##objName) {} \ ~wxObject_##objName(); \ - private: \ className *m_p##objName; \ DECLARE_ABSTRACT_CLASS(wxObject_##objName) \ --- 220,223 ---- *************** *** 233,247 **** { \ delete m_p##objName; \ - } \ - void LUACALL wxLua_AddTrackedObject(wxLuaState& wxlState, className *p##objName) \ - { \ - wxlState.AddTrackedObject((long)p##objName, new wxObject_##objName(p##objName)); \ } - // Add a wxWidgets wxObject to the list of tracked objects for - // garbage collection purposes. This is a C function for symmetry with - // the functions defined using wxLUA_DECLARE_ENCAPSULATION. - WXDLLIMPEXP_WXLUA void LUACALL wxLua_AddTrackedObject(wxLuaState& wxlState, wxObject *); - // ---------------------------------------------------------------------------- // wxLuaSmartStringArray - Wraps a "new" array of wxStrings with an automatic --- 229,234 ---- |