A more complete fix for the wxGauge95 --> wxGauge rtti inconsistency
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -599,8 +599,7 @@ wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont
|
|||||||
wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
|
wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
|
||||||
|
|
||||||
# workarounds for bad wxRTTI names
|
# workarounds for bad wxRTTI names
|
||||||
wxGauge95 = wxGauge
|
__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
|
||||||
wxGauge95Ptr = wxGaugePtr
|
|
||||||
|
|
||||||
|
|
||||||
wxPyAssertionError = wxc.wxPyAssertionError
|
wxPyAssertionError = wxc.wxPyAssertionError
|
||||||
|
@@ -507,12 +507,18 @@ void wxPyPtrTypeMap_Add(const char* commonName, const char* ptrName) {
|
|||||||
|
|
||||||
PyObject* wxPyClassExists(const wxString& className) {
|
PyObject* wxPyClassExists(const wxString& className) {
|
||||||
|
|
||||||
|
PyObject* item;
|
||||||
|
wxString name(className);
|
||||||
|
char buff[64]; // should always be big enough...
|
||||||
|
|
||||||
if (!className)
|
if (!className)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
char buff[64]; // should always be big enough...
|
if ((item = PyDict_GetItemString(wxPyPtrTypeMap, (char*)(const char*)name.mbc_str())) != NULL) {
|
||||||
|
name = wxString(PyString_AsString(item), *wxConvCurrent);
|
||||||
|
}
|
||||||
|
|
||||||
sprintf(buff, "%sPtr", (const char*)className.mbc_str());
|
sprintf(buff, "%sPtr", (const char*)name.mbc_str());
|
||||||
PyObject* classobj = PyDict_GetItemString(wxPython_dict, buff);
|
PyObject* classobj = PyDict_GetItemString(wxPython_dict, buff);
|
||||||
|
|
||||||
return classobj; // returns NULL if not found
|
return classobj; // returns NULL if not found
|
||||||
|
@@ -1546,8 +1546,7 @@ wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont
|
|||||||
wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
|
wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
|
||||||
|
|
||||||
# workarounds for bad wxRTTI names
|
# workarounds for bad wxRTTI names
|
||||||
wxGauge95 = wxGauge
|
__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
|
||||||
wxGauge95Ptr = wxGaugePtr
|
|
||||||
|
|
||||||
|
|
||||||
wxPyAssertionError = wxc.wxPyAssertionError
|
wxPyAssertionError = wxc.wxPyAssertionError
|
||||||
|
Reference in New Issue
Block a user