projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
843b22f
)
[py] incref exception type before restoring it
author
Paul Brossier
<piem@piem.org>
Sat, 29 Jun 2019 10:48:56 +0000
(12:48 +0200)
committer
Paul Brossier
<piem@piem.org>
Sat, 29 Jun 2019 10:48:56 +0000
(12:48 +0200)
python/lib/gen_code.py
patch
|
blob
|
history
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);
- PyErr_Restore(PyExc_ValueError, value, traceback);
+ Py_XDECREF(type);
+ type = PyExc_ValueError;
+ Py_XINCREF(type);
+ PyErr_Restore(type, value, traceback);
}}
return NULL;
}}