[Cython] How access and modify errno?
Christian Heimes
lists at cheimes.de
Sat Feb 7 00:34:32 CET 2009
Robert Bradshaw wrote:
> global errno
>
>> errno = 0
>>
>> The Cython compiler insists on creating a new local variable "int
>> __pyx_v_errno" for errno. Is there a way to stop Cython from doing
>> that
>> or do I have to use an extra header file with some macro magic?
>
> No. Cython scoping is just like Python scoping--an assignment creates
> a local in the given scope.
Doh! That was too easy ... :(
Why didn't I think of global in the first place?
Thanks Robert!
Christian
More information about the Cython-dev
mailing list