Re: Upcoming GtkTypeFundemental change



Daniel Egger <degger fhm edu> writes:

> Am Sam, 2002-08-10 um 17.58 schrieb Owen Taylor:
> 
> > typedef enum
> > {
> >   [...]
> >   /* GtkArg types */
> >   GTK_TYPE_CHAR		= G_TYPE_CHAR,
> >   GTK_TYPE_UCHAR	= G_TYPE_UCHAR,
> >   GTK_TYPE_BOOL		= G_TYPE_BOOLEAN,
> >   [...]
> > } GtkFundamentalType;
> 
> > To:
> >  #define GTK_TYPE_CHAR  G_TYPE_CHAR
> >  #define GTK_TYPE_UCHAR G_TYPE_UCHAR
> >  #define GTK_TYPE_BOOL  G_TYPE_BOOLEAN
> >  typedef GType GtkFundementalType;
> 
> What about inserting some GTK_TYPE_MAX = FANCY_DEFINE_FOR_THE_ARCH
> in the enum with FANCY_DEFINE_FOR_THE_ARCH being the largest
> representable number in a register on the arch?
>
> This will not help with the ABI issues but is IMHO not as ugly as
> the defines.

That was suggested in the bugzilla mail; G_MAXLONG would be
an appropriate, non-fancy define. But it strikes me as
overengineering, and has some risk of revealing compiler oddities.

I'm not worried about the ugliness ... it's only deprecated compat
stuff, and the non-deprecated stuff in GLib is even uglier
(by necessity.)

Regards,
                                        Owen



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