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?

Makes sense to me.

- Robert


_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to