On Tue, 12 Sep 2000, Oskar Liljeblad wrote:

> Some time ago this question was asked, but never answered (publicly)...
> This union is in GValue:
>   union {
>     gint	v_int;
>     guint	v_uint;
>     glong	v_long;
>     gulong	v_ulong;
>     gfloat	v_float;
>     gdouble	v_double;
>     gpointer	v_pointer;
>   } data[4];
>          ^- Why is this an array of 4? Seems like a waste of space...

because not every type actually fits into a pointer.
space is not a huge concern here as GValues are mostly
frequently being used for a pretty short time to provide
a generic transport facility for all kinds of typed values.

> Oskar Liljeblad (osk hem passagen se)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]