Updated to SWIG 1.3.24 (plus a patch that corrects a bug and adds back

some things that were changed/removed from my patch I submitted to
them.)

Since it is now possible easily and simply share the SWIG type tables
across modules I reverted to always using the stock SWIG runtime
instead of my slightly hacked up version of it exported via the
wxPython C API.

The %name directive is now deprecated so replaced most uses of it with
a custom %Rename macro that uses %rename internally.  These will
evetually need to be replaced with a DocDecl macro when docstrings are
added.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-12-23 20:44:09 +00:00
parent 47261ba05f
commit 1b8c7ba607
76 changed files with 482 additions and 1650 deletions

View File

@@ -42,7 +42,7 @@ swig_type_info* wxPyFindSwigType(const wxChar* className) {
if (! swigType) {
// it wasn't in the cache, so look it up from SWIG
name.Append(wxT(" *"));
swigType = SWIG_Python_TypeQuery(name.mb_str());
swigType = SWIG_TypeQuery(name.mb_str());
// if it still wasn't found, try looking for a mapped name
if (!swigType) {
@@ -53,7 +53,7 @@ swig_type_info* wxPyFindSwigType(const wxChar* className) {
(char*)(const char*)name.mbc_str())) != NULL) {
name = wxString(PyString_AsString(item), *wxConvCurrent);
name.Append(wxT(" *"));
swigType = SWIG_Python_TypeQuery(name.mb_str());
swigType = SWIG_TypeQuery(name.mb_str());
}
}
if (swigType) {
@@ -109,16 +109,13 @@ PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* className) {
wxCHECK_MSG(swigType != NULL, NULL, wxT("Unknown type in wxPyConvertSwigPtr"));
#ifdef SWIG_COBJECT_TYPES
robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, (char *) swigType->name, NULL);
robj = PySwigObject_FromVoidPtrAndDesc((void *) ptr, (char *)swigType->name);
#else
{
char result[1024];
char *r = result;
*(r++) = '_';
r = SWIG_Python_PackData(r, &ptr, sizeof(void *));
strcpy(r, swigType->name);
robj = PyString_FromString(result);
}
robj = SWIG_PackVoidPtr(result, ptr, swigType->name, sizeof(result)) ?
PyString_FromString(result) : 0;
}
#endif
return robj;
@@ -132,25 +129,6 @@ PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* className) {
// even if they are located in another shared library.
static wxPyCoreAPI API = {
(p_SWIG_Python_TypeRegister_t)SWIG_Python_TypeRegister,
(p_SWIG_Python_TypeCheck_t)SWIG_Python_TypeCheck,
(p_SWIG_Python_TypeCast_t)SWIG_Python_TypeCast,
(p_SWIG_Python_TypeDynamicCast_t)SWIG_Python_TypeDynamicCast,
(p_SWIG_Python_TypeName_t)SWIG_Python_TypeName,
(p_SWIG_Python_TypePrettyName_t)SWIG_Python_TypePrettyName,
(p_SWIG_Python_TypeQuery_t)SWIG_Python_TypeQuery,
(p_SWIG_Python_TypeClientData_t)SWIG_Python_TypeClientData,
(p_SWIG_Python_newvarlink_t)SWIG_Python_newvarlink,
(p_SWIG_Python_addvarlink_t)SWIG_Python_addvarlink,
(p_SWIG_Python_ConvertPtr_t)SWIG_Python_ConvertPtr,
(p_SWIG_Python_ConvertPacked_t)SWIG_Python_ConvertPacked,
(p_SWIG_Python_PackData_t)SWIG_Python_PackData,
(p_SWIG_Python_UnpackData_t)SWIG_Python_UnpackData,
(p_SWIG_Python_NewPointerObj_t)SWIG_Python_NewPointerObj,
(p_SWIG_Python_NewPackedObj_t)SWIG_Python_NewPackedObj,
(p_SWIG_Python_InstallConstants_t)SWIG_Python_InstallConstants,
(p_SWIG_Python_MustGetPtr_t)SWIG_Python_MustGetPtr,
wxPyCheckSwigType,
wxPyConstructObject,
wxPyConvertSwigPtr,