You can see how we did this before with the opencv wrappers starting at line 117 of this file:<div><br></div><div><a href="https://github.com/scikits-image/scikits-image/blob/0.3.1/scikits/image/opencv/opencv_cv.pyx">https://github.com/scikits-image/scikits-image/blob/0.3.1/scikits/image/opencv/opencv_cv.pyx</a></div>
<div><br><br><div class="gmail_quote">On Sat, Mar 17, 2012 at 2:35 PM, Chris Colbert <span dir="ltr"><<a href="mailto:sccolbert@gmail.com">sccolbert@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p>cytpes.addressof(...)</p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Mar 17, 2012 12:52 AM, "Nadav Horesh" <<a href="mailto:nadavh.horesh@gmail.com" target="_blank">nadavh.horesh@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">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.<div><br></div><div> Thank you,</div><div><br></div><div>


     Nadav.<br><br><div class="gmail_quote"><div dir="rtl">בתאריך 16 במרץ 2012 18:09, מאת Stéfan van der Walt <span dir="ltr"><<a href="mailto:stefan@sun.ac.za" target="_blank">stefan@sun.ac.za</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<p>Hi Nadav </p><div>
<p>On Mar 15, 2012 10:54 PM, "Nadav Horesh" <<a href="mailto:nadavh.horesh@gmail.com" target="_blank">nadavh.horesh@gmail.com</a>> wrote:<br>
><br>
> I have the following:<br>
> A library of C function which is compiled into a dll<br>
> A cython module with a function that expects as a parameter a C callback function.<br>
><br>
> 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. </p>
</div><p>There's a Cython Enhancement Proposal for this, but it hasn't been implemented:</p>
<p> <a href="http://wiki.cython.org/enhancements/nativecall" target="_blank">http://wiki.cython.org/enhancements/nativecall</a></p>
<p>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. </p><span><font color="#888888">
<p>Stéfan <br>
 </p>
</font></span></blockquote></div></div></div>
</blockquote></div>
</div></div></blockquote></div><br></div>