[Cython] Question about providing functions to existing C code
Stefan Behnel
stefan_ml at behnel.de
Mon Apr 21 22:57:08 CEST 2008
Hi,
Johannes Wienke wrote:
> Am 04/21/2008 08:52 PM schrieb Robert Bradshaw:
>> Is the callback being used in an asynchronous way? If so, you may have
>> to acquire the GIL (Search for GIL and pyrex/cython/python for a basic
>> background on what the GIL is).
>
> No, everything runs in one thread.
I would still try appending a "with gil" after the callback function
signature, just to be sure, like this:
cdef void my_callback(void* whatever) with gil:
...
It doesn't need to use threads, but it may still release the GIL internally
(for whatever reason).
> Speicherzugriffsfehler
> The last line is the German word for segmentation fault.
You can unset "LANG=" on the command line, as in
LANG= python
to disable translations.
Stefan
More information about the Cython-dev
mailing list