]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/helpers.cpp
wxFileHistory has a second parameter
[wxWidgets.git] / wxPython / src / helpers.cpp
index b89e8fec50b036ab87155f49bb9edd48fab25dfe..69e70b5106a5274b5ec749cd3de1538460d0c156 100644 (file)
@@ -519,7 +519,10 @@ void __wxPyPreStart(PyObject* moduleDict)
 {
 
 #ifdef __WXMSW__
-//    wxCrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
+//     wxCrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF
+//                     | _CRTDBG_CHECK_ALWAYS_DF
+//                     | _CRTDBG_DELAY_FREE_MEM_DF                             
+//         );
 #endif
 
 #ifdef WXP_WITH_THREAD
@@ -953,7 +956,7 @@ void wxPyPtrTypeMap_Add(const char* commonName, const char* ptrName) {
 
 
 
-PyObject*  wxPyMake_wxObject(wxObject* source, bool checkEvtHandler) {
+PyObject*  wxPyMake_wxObject(wxObject* source, bool setThisOwn, bool checkEvtHandler) {
     PyObject* target = NULL;
     bool      isEvtHandler = False;
 
@@ -986,7 +989,7 @@ PyObject*  wxPyMake_wxObject(wxObject* source, bool checkEvtHandler) {
                 exists = wxPyCheckSwigType(name);
             }
             if (info) {
-                target = wxPyConstructObject((void*)source, name, False);
+                target = wxPyConstructObject((void*)source, name, setThisOwn);
                 if (target && isEvtHandler)
                     ((wxEvtHandler*)source)->SetClientObject(new wxPyOORClientData(target));
             } else {
@@ -1003,7 +1006,7 @@ PyObject*  wxPyMake_wxObject(wxObject* source, bool checkEvtHandler) {
 }
 
 
-PyObject*  wxPyMake_wxSizer(wxSizer* source) {
+PyObject*  wxPyMake_wxSizer(wxSizer* source, bool setThisOwn) {
     PyObject* target = NULL;
 
     if (source && wxIsKindOf(source, wxSizer)) {
@@ -1018,7 +1021,7 @@ PyObject*  wxPyMake_wxSizer(wxSizer* source) {
         }
     }
     if (! target) {
-        target = wxPyMake_wxObject(source, False);
+        target = wxPyMake_wxObject(source, setThisOwn, False);
         if (target != Py_None)
             ((wxSizer*)source)->SetClientObject(new wxPyOORClientData(target));
     }
@@ -1841,7 +1844,7 @@ PyObject* wxPy_ConvertList(wxListBase* listbase) {
     pyList = PyList_New(0);
     while (node) {
         wxObj = node->GetData();
-        pyObj = wxPyMake_wxObject(wxObj);
+        pyObj = wxPyMake_wxObject(wxObj,false);
         PyList_Append(pyList, pyObj);
         node = node->GetNext();
     }