[Pyrex] FILE and *opendir
Tom Kobialka
u3356514 at anu.edu.au
Sat Jun 5 06:48:44 CEST 2004
Hi,
Thanks for all your help, its greatly appreciated. A few more quick
questions :)
cdef extern from "FrIO.h":
ctypedef struct FrIO:
FILE *fp
pyrexc rejects the above as, "Syntax error in C variable declaration",
understandably since I have neglected to define FILE. My question is,
can I define FILE as a C struct our will I have to revert to python?
I've had a look through the obvious C libraries for a suitable
definition with little luck. This leads me to conclude i'll probably
have to go with python. Admittedly my python familiarity is about as
good as my pyrex skills ( < 1 week).
I also have this little scenario:
cdef extern from "dirent.h":
ctypedef struct DIR
*opendir (char *) <------ Problem
pyrexc informs me:
Pointer base type cannot be a Python object
How can I work around this?
Cheers
Tom
More information about the Pyrex
mailing list