From: Nathaniel Talbott Date: 2003-09-11T00:06:18+09:00 Subject: Re: Calling fun taking struct and not pointer to struct? Robert Feldt [mailto:feldt@ce.chalmers.se] wrote: > > 3) If a nested struct's members can portably be accessed by simply > > pretending they exist directly in the containing struct? > > > This is what I'm asking. > > Sorry for confusion. > > If 3 is the case we can use this technique for the situation > you mentioned. Hmmm... I may end up doing that for now, but it's just so ugly. It sure would be nice to have direct support for this in the DL library like so: module M extend DL::Importable S1 = struct [ 'int a', 'int b' ] typealias('S1', S1) S2 = struct [ 'S1 c', 'S1 d' ] end s = M::S2::malloc s.c.a = 42 Or something like that. I've looked at the internals of the DL library some, and it seems pretty clean, so I may see if I can create a patch to do the above. Nathaniel <:((><