> When compiling for PyPy, Cython therefore needs a way to tell PyPy about
> any changes. For the tstate->curexc_* fields, there are the two functions
> PyErr_Fetch() and PyErr_Restore(). Could we have two similar "official"
> functions for the exc_* fields? Maybe PyErr_FetchLast() and
> PyErr_RestoreLast()?

I wouldn't call the functions *Last, as this may cause confusion with
sys.last_*. I'm also unsure why the current API uses this Fetch/Restore
pair of functions where Fetch clears the variables. A Get/Set pair of
functions would be more natural, IMO (where Get returns "new"
references). This would give PyErr_GetExcInfo/PyErr_SetExcInfo.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to