Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/modules/wxbind/src Modified Files: appframe.cpp clipdrag.cpp config.cpp controls.cpp data.cpp datetime.cpp defsutil.cpp dialogs.cpp event.cpp file.cpp gdi.cpp geometry.cpp grid.cpp help.cpp html.cpp image.cpp menutool.cpp print.cpp regex.cpp sizer.cpp socket.cpp wave.cpp windows.cpp wx_bind.cpp wxlua.cpp xml.cpp Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: xml.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/xml.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** xml.cpp 13 Jun 2007 00:09:03 -0000 1.37 --- xml.cpp 14 Jun 2007 01:23:19 -0000 1.38 *************** *** 88,107 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlNode_Delete[] = { &s_wxluatag_wxXmlNode, NULL }; - static int LUACALL wxLua_wxXmlNode_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlNode_Delete[1] = {{ wxLua_wxXmlNode_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlNode_Delete }}; - static int LUACALL wxLua_wxXmlNode_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxXmlNode * self = (wxXmlNode *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlNode); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlNode_DeleteProperty[] = { &s_wxluatag_wxXmlNode, &s_wxluaarg_String, NULL }; static int LUACALL wxLua_wxXmlNode_DeleteProperty(lua_State *L); --- 88,91 ---- *************** *** 477,480 **** --- 461,480 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlNode_delete[] = { &s_wxluatag_wxXmlNode, NULL }; + static int LUACALL wxLua_wxXmlNode_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlNode_delete[1] = {{ wxLua_wxXmlNode_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlNode_delete }}; + static int LUACALL wxLua_wxXmlNode_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxXmlNode * self = (wxXmlNode *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlNode); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlNode_constructor2[] = { &s_wxluatag_wxXmlNode, &s_wxluaarg_Integer, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluatag_wxXmlProperty, &s_wxluatag_wxXmlNode, NULL }; static int LUACALL wxLua_wxXmlNode_constructor2(lua_State *L); *************** *** 619,623 **** #endif // (wxLUA_USE_wxXMLResource && wxUSE_XML) - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlNode_Delete, 1, NULL }, { "DeleteProperty", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlNode_DeleteProperty, 1, NULL }, { "GetChildren", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlNode_GetChildren, 1, NULL }, --- 619,622 ---- *************** *** 643,646 **** --- 642,646 ---- { "SetProperties", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlNode_SetProperties, 1, NULL }, { "SetType", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlNode_SetType, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlNode_delete, 1, NULL }, #if (wxLUA_USE_wxXMLResource && wxUSE_XML) *************** *** 664,683 **** int s_wxluatag_wxXmlProperty = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlProperty_Delete[] = { &s_wxluatag_wxXmlProperty, NULL }; - static int LUACALL wxLua_wxXmlProperty_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlProperty_Delete[1] = {{ wxLua_wxXmlProperty_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlProperty_Delete }}; - static int LUACALL wxLua_wxXmlProperty_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxXmlProperty * self = (wxXmlProperty *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlProperty); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlProperty_GetName[] = { &s_wxluatag_wxXmlProperty, NULL }; static int LUACALL wxLua_wxXmlProperty_GetName(lua_State *L); --- 664,667 ---- *************** *** 785,788 **** --- 769,788 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlProperty_delete[] = { &s_wxluatag_wxXmlProperty, NULL }; + static int LUACALL wxLua_wxXmlProperty_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlProperty_delete[1] = {{ wxLua_wxXmlProperty_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlProperty_delete }}; + static int LUACALL wxLua_wxXmlProperty_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxXmlProperty * self = (wxXmlProperty *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlProperty); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlProperty_constructor1[] = { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluatag_wxXmlProperty, NULL }; static int LUACALL wxLua_wxXmlProperty_constructor1(lua_State *L); *************** *** 853,857 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxXmlProperty_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlProperty_Delete, 1, NULL }, { "GetName", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlProperty_GetName, 1, NULL }, { "GetNext", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlProperty_GetNext, 1, NULL }, --- 853,856 ---- *************** *** 860,863 **** --- 859,863 ---- { "SetNext", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlProperty_SetNext, 1, NULL }, { "SetValue", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlProperty_SetValue, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlProperty_delete, 1, NULL }, #if (wxLUA_USE_wxXMLResource && wxUSE_XML) *************** *** 881,900 **** int s_wxluatag_wxXmlDocument = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlDocument_Delete[] = { &s_wxluatag_wxXmlDocument, NULL }; - static int LUACALL wxLua_wxXmlDocument_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlDocument_Delete[1] = {{ wxLua_wxXmlDocument_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlDocument_Delete }}; - static int LUACALL wxLua_wxXmlDocument_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxXmlDocument * self = (wxXmlDocument *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlDocument); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlDocument_GetFileEncoding[] = { &s_wxluatag_wxXmlDocument, NULL }; static int LUACALL wxLua_wxXmlDocument_GetFileEncoding(lua_State *L); --- 881,884 ---- *************** *** 1064,1067 **** --- 1048,1067 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlDocument_delete[] = { &s_wxluatag_wxXmlDocument, NULL }; + static int LUACALL wxLua_wxXmlDocument_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlDocument_delete[1] = {{ wxLua_wxXmlDocument_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlDocument_delete }}; + static int LUACALL wxLua_wxXmlDocument_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxXmlDocument * self = (wxXmlDocument *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlDocument); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlDocument_constructor1[] = { &s_wxluaarg_String, &s_wxluaarg_String, NULL }; static int LUACALL wxLua_wxXmlDocument_constructor1(lua_State *L); *************** *** 1132,1136 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxXmlDocument_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlDocument_Delete, 1, NULL }, { "GetFileEncoding", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlDocument_GetFileEncoding, 1, NULL }, { "GetRoot", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlDocument_GetRoot, 1, NULL }, --- 1132,1135 ---- *************** *** 1142,1145 **** --- 1141,1145 ---- { "SetRoot", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlDocument_SetRoot, 1, NULL }, { "SetVersion", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlDocument_SetVersion, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlDocument_delete, 1, NULL }, #if (wxLUA_USE_wxXMLResource && wxUSE_XML) *************** *** 1295,1314 **** #endif // (wxLUA_USE_wxFrame) && (wxLUA_USE_wxXMLResource && wxUSE_XML) - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlResource_Delete[] = { &s_wxluatag_wxXmlResource, NULL }; - static int LUACALL wxLua_wxXmlResource_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlResource_Delete[1] = {{ wxLua_wxXmlResource_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlResource_Delete }}; - static int LUACALL wxLua_wxXmlResource_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxXmlResource * self = (wxXmlResource *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlResource); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlResource_Get[] = { &s_wxluatag_wxXmlResource, NULL }; static int LUACALL wxLua_wxXmlResource_Get(lua_State *L); --- 1295,1298 ---- *************** *** 1743,1746 **** --- 1727,1746 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlResource_delete[] = { &s_wxluatag_wxXmlResource, NULL }; + static int LUACALL wxLua_wxXmlResource_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlResource_delete[1] = {{ wxLua_wxXmlResource_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlResource_delete }}; + static int LUACALL wxLua_wxXmlResource_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxXmlResource * self = (wxXmlResource *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlResource); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlResource_constructor1[] = { &s_wxluaarg_String, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxXmlResource_constructor1(lua_State *L); *************** *** 1897,1901 **** #endif // (wxLUA_USE_wxFrame) && (wxLUA_USE_wxXMLResource && wxUSE_XML) - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlResource_Delete, 1, NULL }, { "Get", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_Get, 1, NULL }, { "GetFlags", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_GetFlags, 1, NULL }, --- 1897,1900 ---- *************** *** 1940,1943 **** --- 1939,1943 ---- { "SetFlags", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_SetFlags, 1, NULL }, { "Unload", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_Unload, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlResource_delete, 1, NULL }, #if (wxLUA_USE_wxXMLResource && wxUSE_XML) Index: defsutil.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/defsutil.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** defsutil.cpp 13 Jun 2007 00:08:58 -0000 1.39 --- defsutil.cpp 14 Jun 2007 01:23:13 -0000 1.40 *************** *** 53,72 **** #endif // (wxUSE_STREAMS) && (wxLUA_USE_wxProcess) - static wxLuaArgTag s_wxluatagArray_wxLua_wxProcess_Delete[] = { &s_wxluatag_wxProcess, NULL }; - static int LUACALL wxLua_wxProcess_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxProcess_Delete[1] = {{ wxLua_wxProcess_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxProcess_Delete }}; - static int LUACALL wxLua_wxProcess_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxProcess * self = (wxProcess *)wxlState.GetUserDataType(1, s_wxluatag_wxProcess); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxProcess_Detach[] = { &s_wxluatag_wxProcess, NULL }; static int LUACALL wxLua_wxProcess_Detach(lua_State *L); --- 53,56 ---- *************** *** 319,322 **** --- 303,322 ---- #endif // ((wxUSE_STREAMS) && (wxLUA_USE_wxProcess)) && (wxUSE_STREAMS) + static wxLuaArgTag s_wxluatagArray_wxLua_wxProcess_delete[] = { &s_wxluatag_wxProcess, NULL }; + static int LUACALL wxLua_wxProcess_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxProcess_delete[1] = {{ wxLua_wxProcess_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxProcess_delete }}; + static int LUACALL wxLua_wxProcess_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxProcess * self = (wxProcess *)wxlState.GetUserDataType(1, s_wxluatag_wxProcess); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxProcess_constructor[] = { &s_wxluatag_wxEvtHandler, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxProcess_constructor(lua_State *L); *************** *** 353,357 **** #endif // (wxUSE_STREAMS) && (wxLUA_USE_wxProcess) - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxProcess_Delete, 1, NULL }, { "Detach", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxProcess_Detach, 1, NULL }, { "Exists", WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, s_wxluafunc_wxLua_wxProcess_Exists, 1, NULL }, --- 353,356 ---- *************** *** 378,381 **** --- 377,381 ---- #endif // ((wxUSE_STREAMS) && (wxLUA_USE_wxProcess)) && (wxUSE_STREAMS) + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxProcess_delete, 1, NULL }, { "wxProcess", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxProcess_constructor, 1, NULL }, *************** *** 450,469 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxMouseState_Delete[] = { &s_wxluatag_wxMouseState, NULL }; - static int LUACALL wxLua_wxMouseState_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxMouseState_Delete[1] = {{ wxLua_wxMouseState_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxMouseState_Delete }}; - static int LUACALL wxLua_wxMouseState_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxMouseState * self = (wxMouseState *)wxlState.GetUserDataType(1, s_wxluatag_wxMouseState); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxMouseState_GetX[] = { &s_wxluatag_wxMouseState, NULL }; static int LUACALL wxLua_wxMouseState_GetX(lua_State *L); --- 450,453 ---- *************** *** 745,748 **** --- 729,748 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxMouseState_delete[] = { &s_wxluatag_wxMouseState, NULL }; + static int LUACALL wxLua_wxMouseState_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxMouseState_delete[1] = {{ wxLua_wxMouseState_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxMouseState_delete }}; + static int LUACALL wxLua_wxMouseState_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxMouseState * self = (wxMouseState *)wxlState.GetUserDataType(1, s_wxluatag_wxMouseState); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxMouseState_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxMouseState_constructor[1] = {{ wxLua_wxMouseState_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 771,775 **** { "CmdDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMouseState_CmdDown, 1, NULL }, { "ControlDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMouseState_ControlDown, 1, NULL }, - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxMouseState_Delete, 1, NULL }, { "GetX", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMouseState_GetX, 1, NULL }, { "GetY", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMouseState_GetY, 1, NULL }, --- 771,774 ---- *************** *** 788,791 **** --- 787,791 ---- { "SetY", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMouseState_SetY, 1, NULL }, { "ShiftDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMouseState_ShiftDown, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxMouseState_delete, 1, NULL }, { "wxMouseState", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxMouseState_constructor, 1, NULL }, *************** *** 806,813 **** int s_wxluatag_wxBusyCursor = -1; ! static wxLuaArgTag s_wxluatagArray_wxLua_wxBusyCursor_Delete[] = { &s_wxluatag_wxBusyCursor, NULL }; ! static int LUACALL wxLua_wxBusyCursor_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxBusyCursor_Delete[1] = {{ wxLua_wxBusyCursor_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxBusyCursor_Delete }}; ! static int LUACALL wxLua_wxBusyCursor_Delete(lua_State *L) { wxLuaState wxlState(L); --- 806,813 ---- int s_wxluatag_wxBusyCursor = -1; ! static wxLuaArgTag s_wxluatagArray_wxLua_wxBusyCursor_delete[] = { &s_wxluatag_wxBusyCursor, NULL }; ! static int LUACALL wxLua_wxBusyCursor_delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxBusyCursor_delete[1] = {{ wxLua_wxBusyCursor_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxBusyCursor_delete }}; ! static int LUACALL wxLua_wxBusyCursor_delete(lua_State *L) { wxLuaState wxlState(L); *************** *** 857,861 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxBusyCursor_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxBusyCursor_Delete, 1, NULL }, #if (wxLUA_USE_wxBusyCursor) && (wxLUA_USE_wxCursor) --- 857,861 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxBusyCursor_methods[] = { ! { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxBusyCursor_delete, 1, NULL }, #if (wxLUA_USE_wxBusyCursor) && (wxLUA_USE_wxCursor) *************** *** 879,886 **** int s_wxluatag_wxBusyInfo = -1; ! static wxLuaArgTag s_wxluatagArray_wxLua_wxBusyInfo_Delete[] = { &s_wxluatag_wxBusyInfo, NULL }; ! static int LUACALL wxLua_wxBusyInfo_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxBusyInfo_Delete[1] = {{ wxLua_wxBusyInfo_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxBusyInfo_Delete }}; ! static int LUACALL wxLua_wxBusyInfo_Delete(lua_State *L) { wxLuaState wxlState(L); --- 879,886 ---- int s_wxluatag_wxBusyInfo = -1; ! static wxLuaArgTag s_wxluatagArray_wxLua_wxBusyInfo_delete[] = { &s_wxluatag_wxBusyInfo, NULL }; ! static int LUACALL wxLua_wxBusyInfo_delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxBusyInfo_delete[1] = {{ wxLua_wxBusyInfo_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxBusyInfo_delete }}; ! static int LUACALL wxLua_wxBusyInfo_delete(lua_State *L) { wxLuaState wxlState(L); *************** *** 925,929 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxBusyInfo_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxBusyInfo_Delete, 1, NULL }, { "wxBusyInfo", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxBusyInfo_constructor, 1, NULL }, --- 925,929 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxBusyInfo_methods[] = { ! { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxBusyInfo_delete, 1, NULL }, { "wxBusyInfo", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxBusyInfo_constructor, 1, NULL }, Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlua.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** wxlua.cpp 13 Jun 2007 00:09:03 -0000 1.42 --- wxlua.cpp 14 Jun 2007 01:23:18 -0000 1.43 *************** *** 26,195 **** - // --------------------------------------------------------------------------- - // Bind class wxLuaState - // --------------------------------------------------------------------------- - - // Lua MetaTable Tag for Class 'wxLuaState' - int s_wxluatag_wxLuaState = -1; - - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaState_Delete[] = { &s_wxluatag_wxLuaState, NULL }; - static int LUACALL wxLua_wxLuaState_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaState_Delete[1] = {{ wxLua_wxLuaState_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaState_Delete }}; - static int LUACALL wxLua_wxLuaState_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaState * self = (wxLuaState *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaState); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - - - - // Map Lua Class Methods to C Binding Functions - wxLuaBindMethod wxLuaState_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaState_Delete, 1, NULL }, - { 0, 0, 0, 0 }, - }; - - int wxLuaState_methodCount = sizeof(wxLuaState_methods)/sizeof(wxLuaBindMethod) - 1; - - - // --------------------------------------------------------------------------- - // Bind class wxLuaObject - // --------------------------------------------------------------------------- - - // Lua MetaTable Tag for Class 'wxLuaObject' - int s_wxluatag_wxLuaObject = -1; - - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_Delete[] = { &s_wxluatag_wxLuaObject, NULL }; - static int LUACALL wxLua_wxLuaObject_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_Delete[1] = {{ wxLua_wxLuaObject_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaObject_Delete }}; - static int LUACALL wxLua_wxLuaObject_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_GetAllocationFlags[] = { &s_wxluatag_wxLuaObject, NULL }; - static int LUACALL wxLua_wxLuaObject_GetAllocationFlags(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_GetAllocationFlags[1] = {{ wxLua_wxLuaObject_GetAllocationFlags, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxLuaObject_GetAllocationFlags }}; - // int GetAllocationFlags() const - static int LUACALL wxLua_wxLuaObject_GetAllocationFlags(lua_State *L) - { - wxLuaState wxlState(L); - int returns; - // get this - wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - // call GetAllocationFlags - returns = self->GetAllocationFlags(); - // push the result number - lua_pushnumber(L, returns); - - return 1; - } - - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_GetObject[] = { &s_wxluatag_wxLuaObject, NULL }; - static int LUACALL wxLua_wxLuaObject_GetObject(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_GetObject[1] = {{ wxLua_wxLuaObject_GetObject, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxLuaObject_GetObject }}; - // %override wxLua_wxLuaObject_GetObject - // void *GetObject() const - static int LUACALL wxLua_wxLuaObject_GetObject(lua_State *L) - { - wxLuaState wxlState(L); - // get this - wxLuaObject *self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - // call GetObject that push the item onto the stack, or nil - if (self->GetObject()) - return 1; - - return 0; - } - - - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_HasAllocationFlag[] = { &s_wxluatag_wxLuaObject, &s_wxluaarg_Integer, NULL }; - static int LUACALL wxLua_wxLuaObject_HasAllocationFlag(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_HasAllocationFlag[1] = {{ wxLua_wxLuaObject_HasAllocationFlag, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxLuaObject_HasAllocationFlag }}; - // bool HasAllocationFlag(wxLuaObject_Type flag) - static int LUACALL wxLua_wxLuaObject_HasAllocationFlag(lua_State *L) - { - wxLuaState wxlState(L); - bool returns; - // wxLuaObject_Type flag - wxLuaObject_Type flag = (wxLuaObject_Type)wxlua_getintegertype(L, 2); - // get this - wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - // call HasAllocationFlag - returns = self->HasAllocationFlag(flag); - // push the result flag - lua_pushboolean(L, returns); - - return 1; - } - - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_SetObject[] = { &s_wxluatag_wxLuaObject, NULL }; - static int LUACALL wxLua_wxLuaObject_SetObject(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_SetObject[1] = {{ wxLua_wxLuaObject_SetObject, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxLuaObject_SetObject }}; - // %override wxLua_wxLuaObject_SetObject - // void SetObject(void *object) - static int LUACALL wxLua_wxLuaObject_SetObject(lua_State *L) - { - wxLuaState wxlState(L); - // get this - wxLuaObject *self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - // call SetObject - self->SetObject(1); - // return the number of parameters - return 0; - } - - - static int LUACALL wxLua_wxLuaObject_constructor(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_constructor[1] = {{ wxLua_wxLuaObject_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; - // %override wxLua_wxLuaObject_constructor - // wxLuaObject(void *object) - static int LUACALL wxLua_wxLuaObject_constructor(lua_State *L) - { - wxluabind_removetableforcall(L); - wxLuaState wxlState(L); - wxLuaObject *returns; - // call constructor - returns = new wxLuaObject(wxlState, 1); - // add to tracked memory list - wxlState.AddTrackedObject(returns); - // push the constructed class pointer - wxlState.PushUserDataType(s_wxluatag_wxLuaObject, returns); - // return the number of parameters - return 1; - } - - - - - // Map Lua Class Methods to C Binding Functions - wxLuaBindMethod wxLuaObject_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaObject_Delete, 1, NULL }, - { "GetAllocationFlags", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_GetAllocationFlags, 1, NULL }, - { "GetObject", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_GetObject, 1, NULL }, - { "HasAllocationFlag", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_HasAllocationFlag, 1, NULL }, - { "SetObject", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_SetObject, 1, NULL }, - { "wxLuaObject", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxLuaObject_constructor, 1, NULL }, - { 0, 0, 0, 0 }, - }; - - int wxLuaObject_methodCount = sizeof(wxLuaObject_methods)/sizeof(wxLuaBindMethod) - 1; - - #if wxLUA_USE_wxLuaPrintout --- 26,29 ---- *************** *** 201,220 **** int s_wxluatag_wxLuaPrintout = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaPrintout_Delete[] = { &s_wxluatag_wxLuaPrintout, NULL }; - static int LUACALL wxLua_wxLuaPrintout_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaPrintout_Delete[1] = {{ wxLua_wxLuaPrintout_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaPrintout_Delete }}; - static int LUACALL wxLua_wxLuaPrintout_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaPrintout * self = (wxLuaPrintout *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaPrintout); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaPrintout_GetID[] = { &s_wxluatag_wxLuaPrintout, NULL }; static int LUACALL wxLua_wxLuaPrintout_GetID(lua_State *L); --- 35,38 ---- *************** *** 280,283 **** --- 98,117 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaPrintout_delete[] = { &s_wxluatag_wxLuaPrintout, NULL }; + static int LUACALL wxLua_wxLuaPrintout_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaPrintout_delete[1] = {{ wxLua_wxLuaPrintout_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaPrintout_delete }}; + static int LUACALL wxLua_wxLuaPrintout_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxLuaPrintout * self = (wxLuaPrintout *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaPrintout); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaPrintout_constructor[] = { &s_wxluaarg_String, &s_wxluatag_wxLuaObject, NULL }; static int LUACALL wxLua_wxLuaPrintout_constructor(lua_State *L); *************** *** 312,319 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaPrintout_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaPrintout_Delete, 1, NULL }, { "GetID", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaPrintout_GetID, 1, NULL }, { "SetPageInfo", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaPrintout_SetPageInfo, 1, NULL }, { "TestVirtualFunctionBinding", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaPrintout_TestVirtualFunctionBinding, 1, NULL }, { "wxLuaPrintout", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxLuaPrintout_constructor, 1, NULL }, --- 146,153 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaPrintout_methods[] = { { "GetID", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaPrintout_GetID, 1, NULL }, { "SetPageInfo", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaPrintout_SetPageInfo, 1, NULL }, { "TestVirtualFunctionBinding", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaPrintout_TestVirtualFunctionBinding, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaPrintout_delete, 1, NULL }, { "wxLuaPrintout", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxLuaPrintout_constructor, 1, NULL }, *************** *** 397,417 **** int s_wxluatag_wxLuaHtmlWinTagEvent = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaHtmlWinTagEvent_Delete[] = { &s_wxluatag_wxLuaHtmlWinTagEvent, NULL }; - static int LUACALL wxLua_wxLuaHtmlWinTagEvent_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaHtmlWinTagEvent_Delete[1] = {{ wxLua_wxLuaHtmlWinTagEvent_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaHtmlWinTagEvent_Delete }}; - static int LUACALL wxLua_wxLuaHtmlWinTagEvent_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaHtmlWinTagEvent * self = (wxLuaHtmlWinTagEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaHtmlWinTagEvent); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - - #if (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaHtmlWinTagEvent_GetHtmlParser[] = { &s_wxluatag_wxLuaHtmlWinTagEvent, NULL }; --- 231,234 ---- *************** *** 490,493 **** --- 307,326 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaHtmlWinTagEvent_delete[] = { &s_wxluatag_wxLuaHtmlWinTagEvent, NULL }; + static int LUACALL wxLua_wxLuaHtmlWinTagEvent_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaHtmlWinTagEvent_delete[1] = {{ wxLua_wxLuaHtmlWinTagEvent_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaHtmlWinTagEvent_delete }}; + static int LUACALL wxLua_wxLuaHtmlWinTagEvent_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxLuaHtmlWinTagEvent * self = (wxLuaHtmlWinTagEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaHtmlWinTagEvent); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + *************** *** 495,500 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaHtmlWinTagEvent_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaHtmlWinTagEvent_Delete, 1, NULL }, - #if (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) { "GetHtmlParser", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaHtmlWinTagEvent_GetHtmlParser, 1, NULL }, --- 328,331 ---- *************** *** 504,507 **** --- 335,339 ---- { "GetParseInnerCalled", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaHtmlWinTagEvent_GetParseInnerCalled, 1, NULL }, { "SetParseInnerCalled", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaHtmlWinTagEvent_SetParseInnerCalled, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaHtmlWinTagEvent_delete, 1, NULL }, { 0, 0, 0, 0 }, Index: image.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/image.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** image.cpp 13 Jun 2007 00:09:01 -0000 1.43 --- image.cpp 14 Jun 2007 01:23:15 -0000 1.44 *************** *** 258,277 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_Delete[] = { &s_wxluatag_wxImage, NULL }; - static int LUACALL wxLua_wxImage_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_Delete[1] = {{ wxLua_wxImage_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxImage_Delete }}; - static int LUACALL wxLua_wxImage_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_Destroy[] = { &s_wxluatag_wxImage, NULL }; static int LUACALL wxLua_wxImage_Destroy(lua_State *L); --- 258,261 ---- *************** *** 1732,1735 **** --- 1716,1735 ---- #endif // (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_delete[] = { &s_wxluatag_wxImage, NULL }; + static int LUACALL wxLua_wxImage_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_delete[1] = {{ wxLua_wxImage_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxImage_delete }}; + static int LUACALL wxLua_wxImage_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_op_assign[] = { &s_wxluatag_wxImage, &s_wxluatag_wxImage, NULL }; static int LUACALL wxLua_wxImage_op_assign(lua_State *L); *************** *** 2152,2156 **** { "Copy", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImage_Copy, 1, NULL }, { "Create", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImage_Create, 1, NULL }, - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxImage_Delete, 1, NULL }, { "Destroy", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImage_Destroy, 1, NULL }, { "FindFirstUnusedColour", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImage_FindFirstUnusedColour, 1, NULL }, --- 2152,2155 ---- *************** *** 2263,2266 **** --- 2262,2266 ---- #endif // (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxImage_delete, 1, NULL }, { "op_assign", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImage_op_assign, 1, NULL }, *************** *** 2764,2783 **** int s_wxluatag_wxImageHandler = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHandler_Delete[] = { &s_wxluatag_wxImageHandler, NULL }; - static int LUACALL wxLua_wxImageHandler_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxImageHandler_Delete[1] = {{ wxLua_wxImageHandler_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxImageHandler_Delete }}; - static int LUACALL wxLua_wxImageHandler_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxImageHandler * self = (wxImageHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHandler); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHandler_GetExtension[] = { &s_wxluatag_wxImageHandler, NULL }; static int LUACALL wxLua_wxImageHandler_GetExtension(lua_State *L); --- 2764,2767 ---- *************** *** 2998,3001 **** --- 2982,3001 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHandler_delete[] = { &s_wxluatag_wxImageHandler, NULL }; + static int LUACALL wxLua_wxImageHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxImageHandler_delete[1] = {{ wxLua_wxImageHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxImageHandler_delete }}; + static int LUACALL wxLua_wxImageHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxImageHandler * self = (wxImageHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHandler); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + *************** *** 3003,3007 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxImageHandler_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxImageHandler_Delete, 1, NULL }, { "GetExtension", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHandler_GetExtension, 1, NULL }, --- 3003,3006 ---- *************** *** 3023,3026 **** --- 3022,3026 ---- { "SetName", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHandler_SetName, 1, NULL }, { "SetType", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHandler_SetType, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxImageHandler_delete, 1, NULL }, { 0, 0, 0, 0 }, Index: config.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/config.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** config.cpp 13 Jun 2007 00:08:58 -0000 1.40 --- config.cpp 14 Jun 2007 01:23:11 -0000 1.41 *************** *** 50,74 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_Delete[] = { &s_wxluatag_wxConfigBase, NULL }; - static int LUACALL wxLua_wxConfigBase_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxConfigBase_Delete[1] = {{ wxLua_wxConfigBase_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxConfigBase_Delete }}; - // %override wxLua_wxConfigBase_Delete - // void Destroy() - static int LUACALL wxLua_wxConfigBase_Delete(lua_State *L) - { - wxLuaState wxlState(L); - // get this - wxConfigBase *self = (wxConfigBase *)wxlState.GetUserDataType(1, s_wxluatag_wxConfigBase); - - if (wxConfigBase::Get(false) == self) // clear us from the wxConfigBase - wxConfigBase::Set(NULL); - - // call Destroy - delete self; - // return the number of parameters - return 0; - } - - static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_DeleteAll[] = { &s_wxluatag_wxConfigBase, NULL }; static int LUACALL wxLua_wxConfigBase_DeleteAll(lua_State *L); --- 50,53 ---- *************** *** 732,735 **** --- 711,735 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_delete[] = { &s_wxluatag_wxConfigBase, NULL }; + static int LUACALL wxLua_wxConfigBase_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxConfigBase_delete[1] = {{ wxLua_wxConfigBase_delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxConfigBase_delete }}; + // %override wxLua_wxConfigBase_delete + // void delete() + static int LUACALL wxLua_wxConfigBase_delete(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxConfigBase *self = (wxConfigBase *)wxlState.GetUserDataType(1, s_wxluatag_wxConfigBase); + + if (wxConfigBase::Get(false) == self) // clear us from the wxConfigBase + wxConfigBase::Set(NULL); + + // call Destroy + delete self; + // return the number of parameters + return 0; + } + + *************** *** 775,779 **** wxLuaBindMethod wxConfigBase_methods[] = { { "Create", WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, s_wxluafunc_wxLua_wxConfigBase_Create, 1, NULL }, - { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxConfigBase_Delete, 1, NULL }, { "DeleteAll", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxConfigBase_DeleteAll, 1, NULL }, { "DeleteEntry", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxConfigBase_DeleteEntry, 1, NULL }, --- 775,778 ---- *************** *** 813,816 **** --- 812,817 ---- #endif // (wxLUA_USE_wxConfig && wxUSE_CONFIG) + { "delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxConfigBase_delete, 1, NULL }, + { 0, 0, 0, 0 }, }; *************** *** 1002,1021 **** int s_wxluatag_wxConfigPathChanger = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigPathChanger_Delete[] = { &s_wxluatag_wxConfigPathChanger, NULL }; - static int LUACALL wxLua_wxConfigPathChanger_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxConfigPathChanger_Delete[1] = {{ wxLua_wxConfigPathChanger_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxConfigPathChanger_Delete }}; - static int LUACALL wxLua_wxConfigPathChanger_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxConfigPathChanger * self = (wxConfigPathChanger *)wxlState.GetUserDataType(1, s_wxluatag_wxConfigPathChanger); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigPathChanger_Name[] = { &s_wxluatag_wxConfigPathChanger, NULL }; static int LUACALL wxLua_wxConfigPathChanger_Name(lua_State *L); --- 1003,1006 ---- *************** *** 1055,1058 **** --- 1040,1059 ---- #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxConfig && wxUSE_CONFIG) + static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigPathChanger_delete[] = { &s_wxluatag_wxConfigPathChanger, NULL }; + static int LUACALL wxLua_wxConfigPathChanger_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxConfigPathChanger_delete[1] = {{ wxLua_wxConfigPathChanger_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxConfigPathChanger_delete }}; + static int LUACALL wxLua_wxConfigPathChanger_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxConfigPathChanger * self = (wxConfigPathChanger *)wxlState.GetUserDataType(1, s_wxluatag_wxConfigPathChanger); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigPathChanger_constructor[] = { &s_wxluatag_wxConfigBase, &s_wxluaarg_String, NULL }; static int LUACALL wxLua_wxConfigPathChanger_constructor(lua_State *L); *************** *** 1083,1087 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxConfigPathChanger_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxConfigPathChanger_Delete, 1, NULL }, { "Name", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxConfigPathChanger_Name, 1, NULL }, --- 1084,1087 ---- *************** *** 1090,1093 **** --- 1090,1094 ---- #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxConfig && wxUSE_CONFIG) + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxConfigPathChanger_delete, 1, NULL }, { "wxConfigPathChanger", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxConfigPathChanger_constructor, 1, NULL }, Index: grid.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/grid.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** grid.cpp 13 Jun 2007 00:09:00 -0000 1.41 --- grid.cpp 14 Jun 2007 01:23:14 -0000 1.42 *************** *** 7471,7490 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxGridEvent_Delete[] = { &s_wxluatag_wxGridEvent, NULL }; - static int LUACALL wxLua_wxGridEvent_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridEvent_Delete[1] = {{ wxLua_wxGridEvent_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxGridEvent_Delete }}; - static int LUACALL wxLua_wxGridEvent_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxGridEvent * self = (wxGridEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxGridEvent); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxGridEvent_GetCol[] = { &s_wxluatag_wxGridEvent, NULL }; static int LUACALL wxLua_wxGridEvent_GetCol(lua_State *L); --- 7471,7474 ---- *************** *** 7602,7605 **** --- 7586,7605 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxGridEvent_delete[] = { &s_wxluatag_wxGridEvent, NULL }; + static int LUACALL wxLua_wxGridEvent_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridEvent_delete[1] = {{ wxLua_wxGridEvent_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxGridEvent_delete }}; + static int LUACALL wxLua_wxGridEvent_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxGridEvent * self = (wxGridEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxGridEvent); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + #if (wxLUA_USE_wxObject) && (wxLUA_USE_wxGrid && wxUSE_GRID) *************** *** 7657,7661 **** { "AltDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEvent_AltDown, 1, NULL }, { "ControlDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEvent_ControlDown, 1, NULL }, - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGridEvent_Delete, 1, NULL }, { "GetCol", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEvent_GetCol, 1, NULL }, --- 7657,7660 ---- *************** *** 7668,7671 **** --- 7667,7671 ---- { "Selecting", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEvent_Selecting, 1, NULL }, { "ShiftDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEvent_ShiftDown, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGridEvent_delete, 1, NULL }, #if (wxLUA_USE_wxObject) && (wxLUA_USE_wxGrid && wxUSE_GRID) *************** *** 7920,7939 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxGridRangeSelectEvent_Delete[] = { &s_wxluatag_wxGridRangeSelectEvent, NULL }; - static int LUACALL wxLua_wxGridRangeSelectEvent_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridRangeSelectEvent_Delete[1] = {{ wxLua_wxGridRangeSelectEvent_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxGridRangeSelectEvent_Delete }}; - static int LUACALL wxLua_wxGridRangeSelectEvent_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxGridRangeSelectEvent * self = (wxGridRangeSelectEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxGridRangeSelectEvent); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxGridRangeSelectEvent_GetBottomRightCoords[] = { &s_wxluatag_wxGridRangeSelectEvent, NULL }; static int LUACALL wxLua_wxGridRangeSelectEvent_GetBottomRightCoords(lua_State *L); --- 7920,7923 ---- *************** *** 8104,8107 **** --- 8088,8107 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxGridRangeSelectEvent_delete[] = { &s_wxluatag_wxGridRangeSelectEvent, NULL }; + static int LUACALL wxLua_wxGridRangeSelectEvent_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridRangeSelectEvent_delete[1] = {{ wxLua_wxGridRangeSelectEvent_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxGridRangeSelectEvent_delete }}; + static int LUACALL wxLua_wxGridRangeSelectEvent_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxGridRangeSelectEvent * self = (wxGridRangeSelectEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxGridRangeSelectEvent); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + #if (wxLUA_USE_wxObject) && (wxLUA_USE_wxGrid && wxUSE_GRID) *************** *** 8155,8159 **** { "AltDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridRangeSelectEvent_AltDown, 1, NULL }, { "ControlDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridRangeSelectEvent_ControlDown, 1, NULL }, - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGridRangeSelectEvent_Delete, 1, NULL }, { "GetBottomRightCoords", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridRangeSelectEvent_GetBottomRightCoords, 1, NULL }, { "GetBottomRow", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridRangeSelectEvent_GetBottomRow, 1, NULL }, --- 8155,8158 ---- *************** *** 8165,8168 **** --- 8164,8168 ---- { "Selecting", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridRangeSelectEvent_Selecting, 1, NULL }, { "ShiftDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridRangeSelectEvent_ShiftDown, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGridRangeSelectEvent_delete, 1, NULL }, #if (wxLUA_USE_wxObject) && (wxLUA_USE_wxGrid && wxUSE_GRID) *************** *** 8186,8205 **** int s_wxluatag_wxGridEditorCreatedEvent = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxGridEditorCreatedEvent_Delete[] = { &s_wxluatag_wxGridEditorCreatedEvent, NULL }; - static int LUACALL wxLua_wxGridEditorCreatedEvent_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridEditorCreatedEvent_Delete[1] = {{ wxLua_wxGridEditorCreatedEvent_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxGridEditorCreatedEvent_Delete }}; - static int LUACALL wxLua_wxGridEditorCreatedEvent_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxGridEditorCreatedEvent * self = (wxGridEditorCreatedEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxGridEditorCreatedEvent); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxGridEditorCreatedEvent_GetCol[] = { &s_wxluatag_wxGridEditorCreatedEvent, NULL }; static int LUACALL wxLua_wxGridEditorCreatedEvent_GetCol(lua_State *L); --- 8186,8189 ---- *************** *** 8307,8310 **** --- 8291,8310 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxGridEditorCreatedEvent_delete[] = { &s_wxluatag_wxGridEditorCreatedEvent, NULL }; + static int LUACALL wxLua_wxGridEditorCreatedEvent_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridEditorCreatedEvent_delete[1] = {{ wxLua_wxGridEditorCreatedEvent_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxGridEditorCreatedEvent_delete }}; + static int LUACALL wxLua_wxGridEditorCreatedEvent_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxGridEditorCreatedEvent * self = (wxGridEditorCreatedEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxGridEditorCreatedEvent); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + #if (wxLUA_USE_wxObject) && (wxLUA_USE_wxGrid && wxUSE_GRID) *************** *** 8346,8350 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxGridEditorCreatedEvent_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGridEditorCreatedEvent_Delete, 1, NULL }, { "GetCol", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEditorCreatedEvent_GetCol, 1, NULL }, { "GetControl", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEditorCreatedEvent_GetControl, 1, NULL }, --- 8346,8349 ---- *************** *** 8353,8356 **** --- 8352,8356 ---- { "SetControl", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEditorCreatedEvent_SetControl, 1, NULL }, { "SetRow", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEditorCreatedEvent_SetRow, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGridEditorCreatedEvent_delete, 1, NULL }, #if (wxLUA_USE_wxObject) && (wxLUA_USE_wxGrid && wxUSE_GRID) Index: file.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/file.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** file.cpp 13 Jun 2007 00:08:59 -0000 1.50 --- file.cpp 14 Jun 2007 01:23:13 -0000 1.51 *************** *** 113,132 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxPathList_Delete[] = { &s_wxluatag_wxPathList, NULL }; - static int LUACALL wxLua_wxPathList_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxPathList_Delete[1] = {{ wxLua_wxPathList_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxPathList_Delete }}; - static int LUACALL wxLua_wxPathList_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxPathList * self = (wxPathList *)wxlState.GetUserDataType(1, s_wxluatag_wxPathList); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - #if wxCHECK_VERSION(2,8,0) --- 113,116 ---- *************** *** 213,216 **** --- 197,216 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxPathList_delete[] = { &s_wxluatag_wxPathList, NULL }; + static int LUACALL wxLua_wxPathList_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxPathList_delete[1] = {{ wxLua_wxPathList_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxPathList_delete }}; + static int LUACALL wxLua_wxPathList_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxPathList * self = (wxPathList *)wxlState.GetUserDataType(1, s_wxluatag_wxPathList); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int... [truncated message content] |