Re: GPatternSpec

> at least for gtk's purposes, additional data needs to be added to the
> pattern spec, in general if you'd want to bundle such structures with
> some of yours, you'd do
> struct _Foo
> {
>   GPatternSpec pspec;
>   /* else stuff */
>   gint     baz;
>   gboolean blob;
> };

This style of programming is going to cause some headaches, specially
if you only want to piggy back the information to GPatternSpec instead
of using it to "derive" a new object.

I suggest for this sort of setups where you are not expected to gain
nothing but information-piggyback to have contstructors for this sort
of type (GPatternSpec) and have the size of the structure and maybe
even the contents be opaque to the end user.

Think of stdio's "FILE" :-)


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