[Dynamite] ANSI C question
Ian Holmes
ihh@fruitfly.org
Thu, 23 Mar 2000 11:41:17 -0800 (PST)
On Thu, 23 Mar 2000, Ewan Birney wrote:
> > Do either of you know if this is strict ANSI, i.e. can we be sure that the
> > first two fields of _GArray (data & len) are mapped to the same memory
> > locations as data and len in _GRealArray in all C compilers?
>
> This is strict ANSI interestingly. (read the back of K&R about struct
> layout).
Thanks.. so it is - I remember being told about this when I first learnt C
but forgot about it.
> >
> > If so it makes life a lot easier...
>
>
> This trick is what GTK uses for inheritance.
>
urgh.