Re: GParamSpec
- From: Tim Janik <timj gtk org>
- To: Owen Taylor <otaylor redhat com>
- Cc: Chema Celorio <chema ximian com>, Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: GParamSpec
- Date: Thu, 21 Jun 2001 02:47:13 +0200 (CEST)
On 20 Jun 2001, Owen Taylor wrote:
> Chema Celorio <chema ximian com> writes:
> > > > - Another thing that i bumped into last night (and this was the first
> > > > time I started using the ParamSpec) is that i could not get the default
> > > > value for an Enum spec.
> > >
> > > Why not?
> > >
> > > struct _GParamSpecEnum
> > > {
> > > GParamSpec parent_instance;
> > >
> > > GEnumClass *enum_class;
> > > glong default_value;
> > > };
> > >
> >
> > I'm sorry, my mistake.
> > Hmm why is it a glong ? (just curious)
>
> I believe the C standard doesn't restrict what integral type will be picked
> for a particular enumeration, so Tim may have just been being cautious,
> in case someone did:
>
> typedef enum {
> Value1,
> Value2 = G_MAXLONG
> } MyEnum;
nope, with the varargs interface that also supports pointers to values
and fills tehm in, we can't actually support longs as flags or enum
values, and the rest of the API reflects that (g_param_sepc_enum()
takes an int, GEnumValue holds int as well). so this was more kind
of a typo.
>
> Regards,
> Owen
>
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]