[Pyrex] `pass' as name for structure field
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Oct 16 23:50:53 UTC 2006
Zajcev Evgeny wrote:
> ----- mm.pyx -----
> cdef extern from "mm.h":
> struct mm:
> char *login
> char *pass
You can specify separate Pyrex and C names for
the field like this:
char *passwd 'pass'
Then you refer to it in Pyrex code as 'passwd',
but in the generated C code it will be called 'pass'.
This works generally wherever you declare a name
that refers to something in C. See the section on
"C Names" in the docs for details.
--
Greg
More information about the Pyrex
mailing list