Brett Calcott, 05.11.2010 05:56:
> 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 ')'

Right, that's not very telling. I pushed a fix that shows at least what was 
found instead, i.e. you'd now get

     /Users/brett/Sandbox/test.pyx:3:22: Expected ')', found 'def'

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

Reply via email to