Copied/merged from the 2.2 branch.
Changes needed to build with new event system git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -405,13 +405,32 @@ SWIG_GetPtrObj(PyObject *obj, void **ptr, char *type) {
|
||||
if (!PyString_Check(obj)) {
|
||||
if (!PyInstance_Check(obj) || !(sobj = PyObject_GetAttrString(obj,"this")))
|
||||
return "";
|
||||
// PyObject_GetAttrString increases sobj refcout !
|
||||
Py_DECREF(sobj);
|
||||
}
|
||||
str = PyString_AsString(sobj);
|
||||
return SWIG_GetPtr(str,ptr,type);
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user