add support for __slot__ case
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8038 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
59d0c24108
commit
7ceec6f458
1 changed files with 11 additions and 2 deletions
|
|
@ -236,7 +236,7 @@ PySwigClientData_Del(PySwigClientData* data)
|
||||||
free(data);
|
free(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PySwigObject */
|
/* =============== PySwigObject =====================*/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
PyObject_HEAD
|
PyObject_HEAD
|
||||||
|
|
@ -840,6 +840,15 @@ SWIG_Python_GetSwigThis(PyObject *pyobj)
|
||||||
return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
|
return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (!obj) {
|
||||||
|
obj = PyObject_GetAttr(pyobj,SWIG_This());
|
||||||
|
if (obj) {
|
||||||
|
Py_DECREF(obj);
|
||||||
|
} else {
|
||||||
|
if (PyErr_Occurred()) PyErr_Clear();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
obj = PyObject_GetAttr(pyobj,SWIG_This());
|
obj = PyObject_GetAttr(pyobj,SWIG_This());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue