Added support for operator overrides (PyNumberMethods) and
member variable access. test suite now croaks on inplaceadd. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12345 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
399ae62561
commit
b1682d4d80
4 changed files with 1933 additions and 1755 deletions
|
|
@ -1076,8 +1076,13 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
|
|||
PyTypeObject *obj_tp;
|
||||
for (obj_tp = obj->ob_type; obj_tp; obj_tp = obj_tp->tp_base) {
|
||||
if (obj_tp == target_tp) {
|
||||
SwigPyObject *sobj = (SwigPyObject*) obj;
|
||||
if (own)
|
||||
*own = *own | sobj->own;
|
||||
if (flags & SWIG_POINTER_DISOWN)
|
||||
sobj->own = 0;
|
||||
if (ptr)
|
||||
*ptr = ((SwigPyObject*) obj)->ptr;
|
||||
*ptr = sobj->ptr;
|
||||
return SWIG_OK;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue