[Cython] Propagating exceptions with functions which returns void*
Dag Sverre Seljebotn
dagss at student.matnat.uio.no
Tue Feb 3 11:35:06 CET 2009
Daniele Pianu wrote:
> Probably I've not completely understood the C-function
> exception-propagating mechanism. I've a function with a prototype like
> this
>
> void* getItem( void* self, int i )
>
Where is this function declared? What kind of exception is raised? C has
no exceptions, and C++ exception needs a different form of declaration:
*http://docs.cython.org/docs/pyrex_differences.html#c-exception-handling*
The "except NULL" is for propagating within-Cython exceptions, see
http://docs.cython.org/docs/language_basics.html#error-return-values
Is this the reason for your problem? I might be missing the mark here.
Dag Sverre
More information about the Cython-dev
mailing list