Changes needed to be able to build with SWIG 1.3.24, 1.3.27 as well as

the upcoming 1.3.28, using #if statements on SWIG_VERSION.

Adjustments to ownership of SWIG objects, add some destructors and
explicitly disown non-window objects when their ownership is
transfered to a C++ object.

Since all window objects are owned by their parent, or by themselves,
always set their thisown attribute to False.

Explicitly set thisown to False after any Destroy() methods are
called, so SWIG doesn't try to destroy them again.

Etc.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-01-29 02:33:00 +00:00
parent dd400cf46d
commit 1ea8df6e6b
3 changed files with 34 additions and 3 deletions

View File

@@ -15,6 +15,7 @@
#include <Python.h>
#include "wx/wxPython/wxPython_int.h"
#include "wx/wxPython/pyistream.h"
#include "wx/wxPython/swigver.h"
#ifdef __WXMSW__
#include <wx/msw/private.h>
@@ -29,8 +30,8 @@
#include <gdk/gdkprivate.h>
#include <wx/gtk/win_gtk.h>
#define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \
GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) : \
GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) : \
GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
#include <locale.h>
#endif
@@ -690,7 +691,8 @@ PyObject* __wxPySetDictionary(PyObject* /* self */, PyObject* args)
#else
_AddInfoString("wx-assertions-off");
#endif
_AddInfoString(wxPy_SWIG_VERSION);
#undef _AddInfoString
PyObject* PlatInfoTuple = PyList_AsTuple(PlatInfo);