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?

-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to