Python SystemError fix with -builtin
Fix error when append on a SWIG Object with -builtin: x.append(10) SystemError: error return without exception set Having append and next methods on a SWIG object by default doesn't seem right to me though.
This commit is contained in:
parent
00ca9c07d1
commit
4e8ea4e853
1 changed files with 1 additions and 0 deletions
|
|
@ -569,6 +569,7 @@ SwigPyObject_append(PyObject* v, PyObject* next)
|
||||||
next = tmp;
|
next = tmp;
|
||||||
#endif
|
#endif
|
||||||
if (!SwigPyObject_Check(next)) {
|
if (!SwigPyObject_Check(next)) {
|
||||||
|
PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
sobj->next = next;
|
sobj->next = next;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue