Merge branch 'master' of github.com:hfalcic/swig into hfalcic-python3-seg-fault
* 'master' of github.com:hfalcic/swig: Fix shadow instance creation failure in Python 3
This commit is contained in:
commit
fb7eb2bedf
1 changed files with 1 additions and 1 deletions
|
|
@ -1310,7 +1310,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#if PY_VERSION_HEX >= 0x03000000
|
#if PY_VERSION_HEX >= 0x03000000
|
||||||
inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
|
inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
|
||||||
if (inst) {
|
if (inst) {
|
||||||
PyObject_SetAttr(inst, SWIG_This(), swig_this);
|
PyObject_SetAttr(inst, SWIG_This(), swig_this);
|
||||||
Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
|
Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue