Re: Patch to allow GRelations > size 2
- From: Owen Taylor <otaylor redhat com>
- To: Russell Keith-Magee <keithmag cs curtin edu au>
- Cc: gtk-devel-list redhat com
- Subject: Re: Patch to allow GRelations > size 2
- Date: 17 Feb 2000 14:57:43 -0500
Russell Keith-Magee <email@example.com> writes:
> Hi all,
> I've been playing around with GRelations of late - potentially quite
> useful, but completely hobbled by the size == 2 restriction.
> I've attached a quick and dirty patch to glib-1.2.6 to allow relations
> of size 3 and 4; The hashing function is just the addition of the
> integer values of the pointers - crude but effective (or at least, more
> effective than not having a hashing function at all :-). I submit this
> unto the Powers That Be for rolling into CVS.
> However, this is really just a stop-gap measure (in particular, an ); if
> glib provides for relations up to size n, someone will always want to
> use a relation of size n+1.
> It would seem to make sense (at least to me) to have a
> g_relation_new_full function, which allows the user to define and use
> their own hashing function, of a size appropriate for their application.
> If anyone else thinks this is a good idea, I will put together a patch.
Thanks for the patch. I've asked Josh MacDonald (who wrote GRelation) to
look at it.
] [Thread Prev