[Pyrex] `pass' as name for structure field

Lenard Lindstrom len-l at telus.net
Mon Oct 16 17:55:21 UTC 2006


On 16 Oct 2006 at 15:06, Zajcev Evgeny wrote:

> Daniele Varrazzo <daniele.varrazzo at gmail.com> writes:
> 
> >> if i can't make changes to mm.h, how could i describe and reference
> >> the `pass' field of mm structure from pyrex?
> >
> > I think you can declare:
> >
> >     cdef extern from "mm.h":
> >       struct mm:
> >         char *login
> >         char *pass "pass_"
> >
> > and use the alias mm.pass_ in your Pyrex code.
> 
> Thanks!  that is exactly what i need, sorry/strange that i missed this
> in docs ..
> 
The example is backwards. It should be:

    char *pass_ "pass"

Lenard Lindstrom
<len-l at telus.net>





More information about the Pyrex mailing list