cytpes.addressof(...)
It is good to know that there is still a hope. In my case I could make it if only a ctype object would expose the address of the underlying C object.Thank you,Nadav.בתאריך 16 במרץ 2012 18:09, מאת Stéfan van der Walt <stefan@sun.ac.za>:Hi Nadav
On Mar 15, 2012 10:54 PM, "Nadav Horesh" <nadavh.horesh@gmail.com> wrote:
>
> I have the following:
> A library of C function which is compiled into a dll
> A cython module with a function that expects as a parameter a C callback function.
>
> My problem is how to make a python script to pass directly the address of a C function from the dll to the cython function.There's a Cython Enhancement Proposal for this, but it hasn't been implemented:
http://wiki.cython.org/enhancements/nativecall
So, I don't think there's a cleaner way, unfortunately. It's great that you found a workaround, though--many people have been struggling with this issue.
Stéfan