[Pyrex] ANN: Pyrex 0.9.4 - LValue Casts are Dead!
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Apr 20 11:50:29 CEST 2006
Lenard Lindstrom wrote:
> When will an external C++ declaration ever be needed? Writing an
> include file when one is missing for a C++ library will likely be
> necessary anyways since class declarations are not possible with
> Pyrex.
To give you a sneak preview of what I have in mind:
cdef char *silly() # This function uses "extern C" linkage
cdef+ char *walk() # This function uses C++ linkage
cdef+ struct Foo: # This is a C++ struct/class
int spam
virtual void grail(char *nun) # ...and consequently can have methods
Generally, anything C++ will be declared with cdef+,
and anything C will be declared with cdef. In the
interests of simplicity and consistency, I would like
to retain this rule even inside cdef extern from
(or cdef+ extern from, for C++ header files).
While you might get away with using cdef instead of
cdef+ for some things in an external header, this will
not be supported and will officially be regarded as
illegal.
--
Greg
More information about the Pyrex
mailing list