From: John L. <jr...@us...> - 2007-06-14 01:23:23
|
Update of /cvsroot/wxlua/wxLua/modules/wxbindstc/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/modules/wxbindstc/src Modified Files: stc.cpp wxstc_bind.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: wxstc_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/src/wxstc_bind.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** wxstc_bind.cpp 12 Jun 2007 05:03:17 -0000 1.25 --- wxstc_bind.cpp 14 Jun 2007 01:23:19 -0000 1.26 *************** *** 1526,1530 **** { m_bindingName = wxT("wxstc"); ! m_nameSpace = wxT("wx"); m_classArray = wxLuaGetClassList_wxstc(m_classCount); m_defineArray = wxLuaGetDefineList_wxstc(m_defineCount); --- 1526,1530 ---- { m_bindingName = wxT("wxstc"); ! m_nameSpace = wxT("wxstc"); m_classArray = wxLuaGetClassList_wxstc(m_classCount); m_defineArray = wxLuaGetDefineList_wxstc(m_defineCount); Index: stc.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/src/stc.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** stc.cpp 13 Jun 2007 00:09:03 -0000 1.39 --- stc.cpp 14 Jun 2007 01:23:19 -0000 1.40 *************** *** 8559,8578 **** int s_wxluatag_wxStyledTextEvent = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxStyledTextEvent_Delete[] = { &s_wxluatag_wxStyledTextEvent, NULL }; - static int LUACALL wxLua_wxStyledTextEvent_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxStyledTextEvent_Delete[1] = {{ wxLua_wxStyledTextEvent_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxStyledTextEvent_Delete }}; - static int LUACALL wxLua_wxStyledTextEvent_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxStyledTextEvent * self = (wxStyledTextEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextEvent); - // 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_wxStyledTextEvent_GetAlt[] = { &s_wxluatag_wxStyledTextEvent, NULL }; static int LUACALL wxLua_wxStyledTextEvent_GetAlt(lua_State *L); --- 8559,8562 ---- *************** *** 9337,9340 **** --- 9321,9340 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxStyledTextEvent_delete[] = { &s_wxluatag_wxStyledTextEvent, NULL }; + static int LUACALL wxLua_wxStyledTextEvent_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxStyledTextEvent_delete[1] = {{ wxLua_wxStyledTextEvent_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxStyledTextEvent_delete }}; + static int LUACALL wxLua_wxStyledTextEvent_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxStyledTextEvent * self = (wxStyledTextEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextEvent); + // 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_wxStyledTextEvent_constructor[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxStyledTextEvent_constructor(lua_State *L); *************** *** 9366,9370 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxStyledTextEvent_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxStyledTextEvent_Delete, 1, NULL }, { "GetAlt", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxStyledTextEvent_GetAlt, 1, NULL }, { "GetControl", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxStyledTextEvent_GetControl, 1, NULL }, --- 9366,9369 ---- *************** *** 9418,9421 **** --- 9417,9421 ---- { "SetX", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxStyledTextEvent_SetX, 1, NULL }, { "SetY", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxStyledTextEvent_SetY, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxStyledTextEvent_delete, 1, NULL }, { "wxStyledTextEvent", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxStyledTextEvent_constructor, 1, NULL }, { 0, 0, 0, 0 }, |