Re: silent property name canonization
- From: Joshua N Pritikin <vishnu pobox com>
- To: Havoc Pennington <hp redhat com>
- Cc: gtk-devel-list gnome org
- Subject: Re: silent property name canonization
- Date: Thu, 30 Aug 2001 21:53:51 +0530
On Thu, Aug 30, 2001 at 11:41:55AM -0400, Havoc Pennington wrote:
> Joshua N Pritikin <vishnu pobox com> writes:
> > i just wasted two hours because the following warning was missing
> > from gparam.c:
> >
> > --- gparam.c.orig Thu Aug 30 13:29:17 2001
> > +++ gparam.c Thu Aug 30 13:30:22 2001
> > @@ -250,6 +250,8 @@ g_param_spec_internal (GType para
> > pspec = (gpointer) g_type_create_instance (param_type);
> > pspec->name = g_strdup (name);
> > g_strcanon (pspec->name, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-", '-');
> > + if (strcmp (name, pspec->name) != 0)
> > + g_warning ("Property name `%s' canonized to `%s'", name, pspec->name);
> > pspec->nick = g_strdup (nick ? nick : pspec->name);
> > pspec->blurb = g_strdup (blurb);
> > pspec->flags = (flags & G_PARAM_USER_MASK) | (flags & G_PARAM_MASK);
> >
> > Now don't take this too seriously. i understand why this patch isn't
> > already part of gobject. Still, it's frustrating.
> >
>
> Oh, I know why we probably do this - so that when we lookup prop names
> we can unconditionally canonicalize the passed-in name and then
> strcmp() with the pspec name.
Well, if you're indifferent, please apply my patch so that there actually
is a strcmp in there. ;-)
--
Get self-realization at <http://sahajayoga.org> ... <http://why-compete.org> ?
Victory to the Divine Mother!!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]