Lisandro Dalcin wrote:
> GCC complains about uninitialized variables when compiling the
> generated C sources in some cases like the below:
> 
> cdef int obj2int(object ob) except *:
>     return ob

As an aside, it's probably more efficient to declare
a function like that as something like

   cdef int obj2int(object ob) except? -1:

or some other unlikely value in place of -1. Then
callers will only call PyError_Occurred if that
particular value is returned, rather than every time.

The only time you should really have to use except *
is with a function returning void.

-- 
Greg

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

Reply via email to