[Fxruby-commits] CVS: FXRuby/ext/fox core_wrap.cpp,1.54,1.55 dialogs_wrap.cpp,1.29,1.30 icons_wrap.c
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <ly...@us...> - 2002-03-23 00:03:28
|
Update of /cvsroot/fxruby/FXRuby/ext/fox In directory usw-pr-cvs1:/tmp/cvs-serv27719/ext/fox Modified Files: core_wrap.cpp dialogs_wrap.cpp icons_wrap.cpp image_wrap.cpp layout_wrap.cpp mdi_wrap.cpp opengl_wrap.cpp scintilla_wrap.cpp ui_wrap.cpp Log Message: Corrected the dangling pointer cleanup problem for FXTreeList#clearItems as described by Gilles in SF Bug #533804. Index: core_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/core_wrap.cpp,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** core_wrap.cpp 19 Mar 2002 23:18:35 -0000 1.54 --- core_wrap.cpp 23 Mar 2002 00:03:09 -0000 1.55 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020319-1109 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020322-0903 * * This file is not intended to be easily readable and contains a number of Index: dialogs_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/dialogs_wrap.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** dialogs_wrap.cpp 19 Mar 2002 23:18:37 -0000 1.29 --- dialogs_wrap.cpp 23 Mar 2002 00:03:21 -0000 1.30 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020319-1109 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020322-0903 * * This file is not intended to be easily readable and contains a number of Index: icons_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/icons_wrap.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** icons_wrap.cpp 19 Mar 2002 23:18:38 -0000 1.32 --- icons_wrap.cpp 23 Mar 2002 00:03:22 -0000 1.33 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020319-1109 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020322-0903 * * This file is not intended to be easily readable and contains a number of Index: image_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/image_wrap.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** image_wrap.cpp 19 Mar 2002 23:18:38 -0000 1.34 --- image_wrap.cpp 23 Mar 2002 00:03:22 -0000 1.35 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020319-1109 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020322-0903 * * This file is not intended to be easily readable and contains a number of Index: layout_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/layout_wrap.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** layout_wrap.cpp 19 Mar 2002 23:18:38 -0000 1.3 --- layout_wrap.cpp 23 Mar 2002 00:03:22 -0000 1.4 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020319-1109 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020322-0903 * * This file is not intended to be easily readable and contains a number of Index: mdi_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/mdi_wrap.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** mdi_wrap.cpp 19 Mar 2002 23:18:38 -0000 1.31 --- mdi_wrap.cpp 23 Mar 2002 00:03:22 -0000 1.32 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020319-1109 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020322-0903 * * This file is not intended to be easily readable and contains a number of Index: opengl_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/opengl_wrap.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** opengl_wrap.cpp 19 Mar 2002 23:18:38 -0000 1.36 --- opengl_wrap.cpp 23 Mar 2002 00:03:22 -0000 1.37 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020319-1109 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020322-0903 * * This file is not intended to be easily readable and contains a number of Index: scintilla_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/scintilla_wrap.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** scintilla_wrap.cpp 19 Mar 2002 23:18:38 -0000 1.12 --- scintilla_wrap.cpp 23 Mar 2002 00:03:23 -0000 1.13 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020319-1109 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020322-0903 * * This file is not intended to be easily readable and contains a number of Index: ui_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/ui_wrap.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ui_wrap.cpp 19 Mar 2002 23:18:38 -0000 1.4 --- ui_wrap.cpp 23 Mar 2002 00:03:23 -0000 1.5 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020319-1109 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020322-0903 * * This file is not intended to be easily readable and contains a number of *************** *** 1054,1057 **** --- 1054,1070 ---- } } + void FXTreeList_clearItems(FXTreeList *self,FXbool notify){ + // Save pointer(s) to the soon-to-be-destroyed items + FXObjectListOf<FXTreeItem> items; + FXRbTreeList::enumerateItems(self->getFirstItem(),self->getLastItem(),items); + + // Do the deed + self->clearItems(notify); + + // Now zero-out pointers held by still-alive Ruby objects + for(FXint i=0;i<items.no();i++){ + FXRbNotifyDestroyed(items[i]); + } + } void FXTreeList_setItemData(FXTreeList *self,FXTreeItem *item,VALUE ptr){ self->setItemData(item,(void*) ptr); *************** *** 58073,58077 **** } } ! (arg1)->clearItems(arg2); return Qnil; --- 58086,58090 ---- } } ! FXTreeList_clearItems(arg1,arg2); return Qnil; |