Basic director support (passes first few director tests). Now fails on iadd_runme, because member variable support is missing.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12340 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Stefan Zager 2010-12-08 21:57:27 +00:00
commit 399ae62561
3 changed files with 66 additions and 28 deletions

View file

@ -459,6 +459,17 @@ namespace Swig {
}
return own;
}
template <typename _Tp>
static PyObject* pyobj_disown (PyObject *pyobj, PyObject *SWIGUNUSEDPARM(args))
{
SwigPyObject *sobj = (SwigPyObject *) pyobj;
sobj->own = 0;
Director *d = SWIG_DIRECTOR_CAST(reinterpret_cast<_Tp*>(sobj->ptr));
if (d) d->swig_disown();
return SWIG_Py_Void();
}
};
#ifdef __THREAD__

View file

@ -1376,6 +1376,8 @@ SWIG_Python_NewBuiltinObj(PyObject *self, void *ptr, swig_type_info *type, int f
SwigPyObject *newobj = (SwigPyObject*) self;
newobj->ptr = ptr;
newobj->own = own;
newobj->ty = type;
newobj->next = 0;
return 0;
}