[Pyrex] incomplete type
Bryan Weingarten
bryan.weingarten at pobox.com
Thu Oct 23 06:25:39 CEST 2003
Greg Ewing wrote:
>>cdef extern from "c_header.h":
>> ctypedef void foo_t
>> foo_t * get_foo()
>>
>>is declaring foo_t to be of type void the right thing to do?
>>
>>
>
>You might get away with it, but you'd be throwing away potentially
>valuable type checking. Better to use
>
> cdef extern from "c_header.h":
> ctypedef struct foo_t:
> pass
>
>Then Pyrex can check that you're using the type foo_t consistently,
>instead of leaving it to the C compiler.
>
>
>
>
when i added
cdef extern from "c_header.h":
ctypedef struct foo_t:
pass
i get a this error:
Syntax error in C variable declariation
the error points to beginning of "pass". i made sure my spaces are all
correct.
bryan
More information about the Pyrex
mailing list