[python] Fix inheriting from multiple director classes

Fix mishandling of a Python class inheriting from multiple SWIG-wrapped
director classes.

Fixes #422
Fixes https://sourceforge.net/p/swig/bugs/1379/
This commit is contained in:
Olly Betts 2022-07-20 13:17:25 +12:00 committed by Olly Betts
commit e23d912b49
4 changed files with 112 additions and 0 deletions

View file

@ -792,6 +792,7 @@ SwigPyObject_append(PyObject* v, PyObject* next)
PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
return NULL;
}
((SwigPyObject *)next)->next = sobj->next;
sobj->next = next;
Py_INCREF(next);
return SWIG_Py_Void();