Re: g_tree_lookup_extended
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list gnome org
- Cc: Sven Neumann <sven gimp org>
- Subject: Re: g_tree_lookup_extended
- Date: 16 Mar 2001 12:20:14 -0500
I see you went ahead and committed this. It looks fine to me, so no
real problems with that. But while I'm closing #50797, let me ask you
to please add docs for this function.
If we consistently add docs for all new entry points, the task of
finishing the GTK+ reference docs gets less daunting. If we omit docs
for new functions, then it gets more daunting.
Regards,
Owen
Sven Neumann <sven gimp org> writes:
> Hi,
>
> I proposed this one a while ago and it's in bugzilla, but it
> wasn't applied until now, so I thought I should simply post
> it again and ask if anyone would object against adding this
> public function to the GTree API:
>
>
> gboolean
> g_tree_lookup_extended (GTree *tree,
> gconstpointer lookup_key,
> gpointer *orig_key,
> gpointer *value)
> {
> GRealTree *rtree;
> GTreeNode *node;
>
> g_return_val_if_fail (tree != NULL, FALSE);
>
> rtree = (GRealTree*) tree;
>
> node = g_tree_node_lookup (rtree->root, rtree->key_compare,
> rtree->key_compare_data, lookup_key);
>
> if (node)
> {
> if (orig_key)
> *orig_key = node->key;
> if (value)
> *value = node->value;
> return TRUE;
> }
> else
> return FALSE;
> }
>
>
> It's the equivalent of g_hash_table_lookup_extended() which has
> been around for a long time and IMHO its an important missing
> feature. So if nobody objects, I'll commit this...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]