Re: [gnome-db] GdaValue sustitution for GValue



On 3/30/06, Murray Cumming <murrayc murrayc com> wrote:
> On Thu, 2006-03-30 at 10:20 +0200, Vivien Malerba wrote:
> [snip]
> > -> I think keeping the GdaValueType enum is safe as it can be used in
> > switch statements,
>
> I don't understand this. Why can't #define values be used in switch
> statements?

The switch statement can only treat constant value cases, and most of
the defined Glib types are in fact function calls. So you cant' have
something like
switch (type) {
   case GTK_OBJECT_TYPE:
     ...
}

Cheers,

Vivien



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