[Pyrex] C name specifications
Paul Malyschko
paul.malyschko at gmail.com
Mon Jan 9 23:39:37 CET 2006
Hi people,
I hadn't found anyone with problems concerning C name specifications,
so I hope I'm just doing something ignorant. To elucidate:
(from the C header)"
struct sample {
char *name;
char *filename;
char *mimetype;
enum loop_type loop_type;
double loop_start;
double loop_end;
cdef extern from "song.h":
cdef struct c_sample "sample":
char *name
char *filename
char *mimetype
loop_type loop_type
double loop_start
double loop_end
Is one example of the C structs from which I need to get into Python.
The data structures on the Python side have been set up, and Pyrex has
no problem semantically with the code, but as soon as I attempt to
compile, I get a whole lot of "dereferencing pointer to incomplete
type" errors.
At first I thought it was some of my other C code, but I double tested
everything I could test, and got a friend to test as well. Once I
took out the C name spec (and renaming the corresponding Python
class), it compiled with no problems. I thought it might be the way I
was using it, but from what I could gather, the above is how it's
supposed to be used with structs.
Any ideas?
Cheers,
Paul.
More information about the Pyrex
mailing list