NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/43488: rb.[hc] API critiques/problems that should be addressed before final release
The following reply was made to PR lib/43488; it has been noted by GNATS.
From: yamt%mwd.biglobe.ne.jp@localhost (YAMAMOTO Takashi)
To: gnats-bugs%NetBSD.org@localhost
Cc: lib-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost
Subject: Re: lib/43488: rb.[hc] API critiques/problems that should be
addressed before final release
Date: Mon, 21 Jun 2010 00:53:54 +0000 (UTC)
hi,
> 3) Someone else noted that the API inserts a node if and only if it is not
> already in the tree. It would be beneficial to have an API to insert a node
> if it is not already in the tree and otherwise return the equivalent node so
> it can be updated. This is needed to efficiently implement higher level
> objects using red-black trees.
i agree.
making rb_tree_insert_node return the existing node likely has
no run-time cost.
YAMAMOTO Takashi
Home |
Main Index |
Thread Index |
Old Index