Correct PyErr_Fetch/PyErr_Restore variable names
This commit is contained in:
parent
fd651ff4e2
commit
e0b23969d0
2 changed files with 6 additions and 6 deletions
|
|
@ -436,15 +436,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap
|
|||
Py_XDECREF(sobj->dict);
|
||||
if (sobj->own) {
|
||||
PyObject *o;
|
||||
PyObject *val = 0, *type = 0, *tb = 0;
|
||||
PyErr_Fetch(&val, &type, &tb);
|
||||
PyObject *type = 0, *value = 0, *traceback = 0;
|
||||
PyErr_Fetch(&type, &value, &traceback);
|
||||
o = wrapper(a, NULL);
|
||||
if (!o) {
|
||||
PyObject *deallocname = PyString_FromString(wrappername);
|
||||
PyErr_WriteUnraisable(deallocname);
|
||||
Py_DECREF(deallocname);
|
||||
}
|
||||
PyErr_Restore(val, type, tb);
|
||||
PyErr_Restore(type, value, traceback);
|
||||
Py_XDECREF(o);
|
||||
}
|
||||
if (PyType_IS_GC(a->ob_type)) {
|
||||
|
|
|
|||
|
|
@ -530,8 +530,8 @@ SwigPyObject_dealloc(PyObject *v)
|
|||
remain true upon return from SwigPyObject_dealloc. So save
|
||||
and restore. */
|
||||
|
||||
PyObject *val = NULL, *type = NULL, *tb = NULL;
|
||||
PyErr_Fetch(&val, &type, &tb);
|
||||
PyObject *type = NULL, *value = NULL, *traceback = NULL;
|
||||
PyErr_Fetch(&type, &value, &traceback);
|
||||
|
||||
if (data->delargs) {
|
||||
/* we need to create a temporary object to carry the destroy operation */
|
||||
|
|
@ -546,7 +546,7 @@ SwigPyObject_dealloc(PyObject *v)
|
|||
if (!res)
|
||||
PyErr_WriteUnraisable(destroy);
|
||||
|
||||
PyErr_Restore(val, type, tb);
|
||||
PyErr_Restore(type, value, traceback);
|
||||
|
||||
Py_XDECREF(res);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue