From: John L. <jr...@us...> - 2006-05-03 22:52:21
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27806/wxLua/modules/wxbind/src Modified Files: controls.cpp file.cpp gdi.cpp geometry.cpp image.cpp Log Message: don't track pushed wxWindows using EVT_DESTROY twice update geometry.i to 2.6.3 fix unary op - to use op_neg and fix binding operators in general update docs for op_neg Index: controls.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/controls.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** controls.cpp 2 May 2006 05:25:01 -0000 1.20 --- controls.cpp 3 May 2006 22:52:18 -0000 1.21 *************** *** 9503,9510 **** wxTreeItemId * self = (wxTreeItemId *)wxlState.GetUserDataType(1, s_wxluatag_wxTreeItemId); // call op_assign ! // allocate a new object using the copy constructor ! returns = new wxTreeItemId((*self)=(*otherId)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxTreeItemId *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxTreeItemId, returns); --- 9503,9508 ---- wxTreeItemId * self = (wxTreeItemId *)wxlState.GetUserDataType(1, s_wxluatag_wxTreeItemId); // call op_assign ! returns = self; ! *returns = ((*self)=(*otherId)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxTreeItemId, returns); Index: file.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/file.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** file.cpp 2 May 2006 05:25:02 -0000 1.15 --- file.cpp 3 May 2006 22:52:18 -0000 1.16 *************** *** 1372,1379 **** wxFileName * self = (wxFileName *)wxlState.GetUserDataType(1, s_wxluatag_wxFileName); // call op_assign ! // allocate a new object using the copy constructor ! returns = new wxFileName((*self)=(*filename)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxFileName *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxFileName, returns); --- 1372,1377 ---- wxFileName * self = (wxFileName *)wxlState.GetUserDataType(1, s_wxluatag_wxFileName); // call op_assign ! returns = self; ! *returns = ((*self)=(*filename)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxFileName, returns); Index: image.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/image.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** image.cpp 2 May 2006 05:25:02 -0000 1.13 --- image.cpp 3 May 2006 22:52:18 -0000 1.14 *************** *** 1393,1400 **** wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); // call op_assign ! // allocate a new object using the copy constructor ! returns = new wxImage((*self)=(*image)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 1393,1398 ---- wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); // call op_assign ! returns = self; ! *returns = ((*self)=(*image)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); Index: gdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/gdi.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** gdi.cpp 2 May 2006 05:25:02 -0000 1.21 --- gdi.cpp 3 May 2006 22:52:18 -0000 1.22 *************** *** 167,174 **** wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_assign ! // allocate a new object using the copy constructor ! returns = new wxPoint((*self)=(*p)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxPoint *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); --- 167,172 ---- wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_assign ! returns = self; ! *returns = ((*self)=(*p)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); *************** *** 261,268 **** wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_add_assign ! // allocate a new object using the copy constructor ! returns = new wxPoint((*self)+=(*p)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxPoint *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); --- 259,264 ---- wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_add_assign ! returns = self; ! *returns = ((*self)+=(*p)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); *************** *** 281,288 **** wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_sub_assign ! // allocate a new object using the copy constructor ! returns = new wxPoint((*self)-=(*p)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxPoint *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); --- 277,282 ---- wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_sub_assign ! returns = self; ! *returns = ((*self)-=(*p)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); *************** *** 301,308 **** wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_add_assign ! // allocate a new object using the copy constructor ! returns = new wxPoint((*self)+=(*s)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxPoint *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); --- 295,300 ---- wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_add_assign ! returns = self; ! *returns = ((*self)+=(*s)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); *************** *** 321,328 **** wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_sub_assign ! // allocate a new object using the copy constructor ! returns = new wxPoint((*self)-=(*s)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxPoint *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); --- 313,318 ---- wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_sub_assign ! returns = self; ! *returns = ((*self)-=(*s)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); Index: geometry.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/geometry.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** geometry.cpp 2 May 2006 05:25:02 -0000 1.12 --- geometry.cpp 3 May 2006 22:52:18 -0000 1.13 *************** *** 32,35 **** --- 32,967 ---- #if wxLUA_USE_Geometry // ------------------------------------------------------------------------------------------------- + // Bind class wxPoint2DInt + // ------------------------------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class + int s_wxluatag_wxPoint2DInt = -1; + + [...1988 lines suppressed...] - static WXLUAMETHOD s_wxPoint2DInt_methods[] = { - { LuaConstructor, "wxPoint2DInt", wxLua_wxPoint2DInt_constructor, 2, 0, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, - { LuaMethod, "GetVectorLength", wxLua_wxPoint2DInt_GetVectorLength, 0, 0, { 0 } }, - { LuaMethod, "GetVectorAngle", wxLua_wxPoint2DInt_GetVectorAngle, 0, 0, { 0 } }, - { LuaMethod, "SetVectorLength", wxLua_wxPoint2DInt_SetVectorLength, 1, 1, { &s_wxluaarg_Number, 0 } }, - { LuaMethod, "SetVectorAngle", wxLua_wxPoint2DInt_SetVectorAngle, 1, 1, { &s_wxluaarg_Number, 0 } }, - { LuaMethod, "GetDistance", wxLua_wxPoint2DInt_GetDistance, 1, 1, { &s_wxluatag_wxPoint2DInt, 0 } }, - { LuaMethod, "GetDistanceSquare", wxLua_wxPoint2DInt_GetDistanceSquare, 1, 1, { &s_wxluatag_wxPoint2DInt, 0 } }, - { LuaMethod, "GetDotProduct", wxLua_wxPoint2DInt_GetDotProduct, 1, 1, { &s_wxluatag_wxPoint2DInt, 0 } }, - { LuaMethod, "GetCrossProduct", wxLua_wxPoint2DInt_GetCrossProduct, 1, 1, { &s_wxluatag_wxPoint2DInt, 0 } }, - { LuaDelete, "wxPoint2DInt", wxLua_wxPoint2DInt_destructor, 0, 0, {0} }, - { LuaMethod, "Delete", wxLua_wxPoint2DInt_Delete, 0, 0, {0} }, - }; - - // Extern accessor to class method map - WXLUAMETHOD* wxPoint2DInt_methods = s_wxPoint2DInt_methods; - int wxPoint2DInt_methodCount = sizeof(s_wxPoint2DInt_methods)/sizeof(s_wxPoint2DInt_methods[0]); - #endif - --- 3037,3038 ---- |