diff --git a/etgtools/tweaker_tools.py b/etgtools/tweaker_tools.py index 09c798be..c07fdfa6 100644 --- a/etgtools/tweaker_tools.py +++ b/etgtools/tweaker_tools.py @@ -520,14 +520,14 @@ def addSipConvertToSubClassCode(klass): %ConvertToSubClassCode const wxClassInfo* info = sipCpp->GetClassInfo(); wxString name = info->GetClassName(); - bool exists = sipFindType(name) != NULL; + bool exists = sipFindType(name.c_str()) != NULL; while (info && !exists) { info = info->GetBaseClass1(); name = info->GetClassName(); - exists = sipFindType(name) != NULL; + exists = sipFindType(name.c_str()) != NULL; } if (info) - sipType = sipFindType(name); + sipType = sipFindType(name.c_str()); else sipType = NULL; %End diff --git a/src/wxpy_api.sip b/src/wxpy_api.sip index 0e036c33..75fa16da 100644 --- a/src/wxpy_api.sip +++ b/src/wxpy_api.sip @@ -111,7 +111,7 @@ static PyObject* i_wxPyConstructObject(void* ptr, if (pos != wxNOT_FOUND) name = name.Mid(pos + nsDelimiter.Len()); - const sipTypeDef* td = sipFindType(name); + const sipTypeDef* td = sipFindType(name.c_str()); if (!td) return NULL; PyObject* transferObj = setThisOwn ? Py_None : NULL; @@ -129,7 +129,7 @@ static bool i_wxPyWrappedPtr_Check(PyObject* obj) // Check if a PyObject is a specific wrapped class or subclass static bool i_wxPyWrappedPtr_TypeCheck(PyObject* obj, const wxString& className) { - const sipTypeDef* td = sipFindType(className); + const sipTypeDef* td = sipFindType(className.c_str()); if (!td) return false; return sipCanConvertToType(obj, td, SIP_NO_CONVERTORS); @@ -139,7 +139,7 @@ static bool i_wxPyWrappedPtr_TypeCheck(PyObject* obj, const wxString& className) // Convert a wrapped SIP object to its C++ pointer, ensuring that it is of the expected type static bool i_wxPyConvertWrappedPtr(PyObject* obj, void **ptr, const wxString& className) { - const sipTypeDef* td = sipFindType(className); + const sipTypeDef* td = sipFindType(className.c_str()); if (!td) return false; if (! sipCanConvertToType(obj, td, SIP_NO_CONVERTORS))