To create pxd files that wrap a C++ interface, I often just cutting
and pasting from the headers then cleaning up the code. A few of the
headers use "def" as a variable name, like this:
cdef extern from "test.h":
    cdef cppclass Test:
        void func(int def)

It took me a while to figure out that the variable name was the
problem (my brain was blanking them as they're not even needed). Maybe
the parse error could be more better than:
/Users/brett/Sandbox/test.pyx:3:22: Expected ')'

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

Reply via email to