[Pyrex] Newbie Missing a Fundamental Point?

Stefan Behnel behnel_ml at gkec.informatik.tu-darmstadt.de
Fri Jul 21 19:24:36 UTC 2006


Hi Kent,

Kent Borg wrote:
> I just discovered Pyrex and it looks real cool.  But I am confused
> about the ctypedef.  It seems that Pyrex wants to be told things
> twice, once in a .h file and again in a Pyrex file.

Pyrex can't parse .h files, but it still needs to know about their content to
generate the right access code in C.

Just consider the .h files to be for the C compiler, while .pxd files are for
Pyrex. Note that you only need to specify the parts of the .h files in your
.pxd files that you actually use in your Pyrex code. The C compiler will have
the full definitions available.

Stefan



More information about the Pyrex mailing list