projects
/
aubio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[py] incref exception type before restoring it
[aubio.git]
/
python
/
lib
/
gen_code.py
diff --git
a/python/lib/gen_code.py
b/python/lib/gen_code.py
index
b48f9a0
..
3db270b
100644
(file)
--- a/
python/lib/gen_code.py
+++ b/
python/lib/gen_code.py
@@
-509,7
+509,10
@@
Pyaubio_{shortname}_set_{param} (Py_{shortname} *self, PyObject *args)
// change the RuntimeError into ValueError
PyObject *type, *value, *traceback;
PyErr_Fetch(&type, &value, &traceback);
// change the RuntimeError into ValueError
PyObject *type, *value, *traceback;
PyErr_Fetch(&type, &value, &traceback);
- PyErr_Restore(PyExc_ValueError, value, traceback);
+ Py_XDECREF(type);
+ type = PyExc_ValueError;
+ Py_XINCREF(type);
+ PyErr_Restore(type, value, traceback);
}}
return NULL;
}}
}}
return NULL;
}}