Re: unnamed stucts
Brad Schick <[email protected]> Wed, 07 May 2008 23:52:32 -0700
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <[email protected]> |
On 05/07/2008 11:36 PM, Greg Ewing wrote: > Brad Schick wrote: > >> Thanks for the feedback, but I'm not sure I see that. Pyrex won't >> compile the code unless I use the names of the nested structs when >> referencing those elements. >> > > Sorry, I must have been thinking of named nested structs when > I wrote that. > > What you should do is flatten the struct and declare all the > members of the nested structs and unions directly as members of > the containing struct. > > Ok, that makes sense. Well its a bit odd, but I understand that to the pyrex compiler only the lexical names really matter in order to generate the C code. Thanks for the tip. -Brad