[Pyrex] C-API implementation in Pyrex 0.9.6
Greg Ewing
greg.ewing at canterbury.ac.nz
Sat Oct 13 22:29:58 CEST 2007
Gustavo Sverzut Barbieri wrote:
> On 10/11/07, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
>
>>That's all you need to do. No linking is required.
>
> Is this a 0.9.6 feature?
Yes.
> wouldn't be great to at least request
> "public" in cdef declaration?
The general principle is that anything declared in a .pxd file
is available for cimport by another Pyrex module -- that's what
the .pxd file is for.
The "public" keyword is for telling Pyrex that you want
something put into a .h file for use by C code. That's more or
less independent of .pxd -- you can do that in the .pyx as
well, and if C linkage is all you want, you don't need a
.pxd at all.
There's currently some overlap with the two which confuses
the issue somewhat. I'm currently thinking about ways to
simplify the rules in this area and make them more consistent.
--
Greg
More information about the Pyrex
mailing list