Ticket #362 (closed defect: fixed)
PyErr_Restore declaration
| Reported by: | dalcinl | Owned by: | dalcinl |
|---|---|---|---|
| Priority: | major | Milestone: | 0.11.3 |
| Component: | Packaging | Keywords: | |
| Cc: |
Description
On Sep 9, 2009, at 12:24 PM, Lisandro Dalcin wrote:
I would like to change this declaration (in Cython/Includes/
python_exc.pxd)
void PyErr_Restore(object type, object value, object traceback)
for this
void PyErr_Restore(PyObject *type, PyObject *value, PyObject
*traceback)
1) That call is usually used after PyErr_Fetch(), which has
PyObject** args...
2) This call steals references, so IMO it is dangerous to use
'object' arguments
3) If should be valid to call PyErr_Restore(NULL,NULL,NULL)
(documented to clear the error indicator)
with this change, these lines (in Cython/Runtime/refnanny.pyx)
PyErr_Restore(<object>type, <object>value, <object>tb)
will become
PyErr_Restore(type, value, tb)
Any objections? Am I missing something?
Change History
Note: See
TracTickets for help on using
tickets.
