Re: [gnome-db] GdaValue sustitution for GValue



On Thu, 2006-03-30 at 11:05 +0200, Vivien Malerba wrote:
> On 3/30/06, Murray Cumming <murrayc murrayc com> wrote:
> > 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:
>      ...
> }

Ah, yes. Well, people have lived with this for GValue, so I think they
can live with it for GdaValue. "else if" is not so bad.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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