From 10694396b6909f4a3313b2ef823eceda3140ef0e Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 20 Jan 2006 18:18:02 +0000 Subject: [PATCH 1/1] Added some (#ifdef'd out) wrappers to help in debugging the swig runtime swig_type_info structures. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/setup.py | 1 + wxPython/src/_swigtype.i | 48 ++++++++++++++++++++++++++++++++++++++++ wxPython/src/core.i | 2 ++ 3 files changed, 51 insertions(+) create mode 100644 wxPython/src/_swigtype.i diff --git a/wxPython/setup.py b/wxPython/setup.py index 555b98593c..52f77cf5b6 100755 --- a/wxPython/setup.py +++ b/wxPython/setup.py @@ -121,6 +121,7 @@ swig_sources = run_swig(['core.i'], 'src', GENDIR, PKGDIR, 'src/_validator.i', 'src/_window.i', 'src/_control.i', + 'src/_swigtype.i', ], True) diff --git a/wxPython/src/_swigtype.i b/wxPython/src/_swigtype.i new file mode 100644 index 0000000000..067d7636fe --- /dev/null +++ b/wxPython/src/_swigtype.i @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: _swigtype.i +// Purpose: stuff to help us debug SWIG's type_info structures... +// +// Author: Robin Dunn +// +// Created: 19-Jan-2006 +// RCS-ID: $Id$ +// Copyright: (c) 2006 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +// Not a %module + + +#if 0 // Only needs to be turned on when debugging SWIG problems + +//--------------------------------------------------------------------------- +%newgroup + +%immutable; + +/* Structure to store inforomation on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +%mutable; + +swig_type_info* SWIG_TypeQuery(const char* name); + +//--------------------------------------------------------------------------- + +#endif + + diff --git a/wxPython/src/core.i b/wxPython/src/core.i index 8014c345ba..40a6648a2c 100644 --- a/wxPython/src/core.i +++ b/wxPython/src/core.i @@ -75,6 +75,8 @@ def _deprecated(callable, msg=None): MAKE_CONST_WXSTRING(EmptyString); +%include _swigtype.i + %include _obj.i %include _gdicmn.i %include _streams.i -- 2.45.2