[Bug 1877] RBTree: compare function instead of key

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Tue Aug 2 19:18:26 UTC 2011


https://www.rtems.org/bugzilla/show_bug.cgi?id=1877

--- Comment #2 from Gedare <giddyup44 at yahoo.com> 2011-08-02 14:18:25 CDT ---
I think this patch is good to go. I do have one request that can be settled in
a later patch:
The new comparison functions do not allow searching for a given key without
first creating an encapsulating structure. So if I want to look for a node in
the tree with the key 42, I first have to create an object of whatever type is
encoded in the tree (so I have to know that) and store a 42 in the key field.
Then I have to pass a pointer to the rbtree node within that structure.

Would it be reasonable to have a set of functions that take a pointer to a key
directly (just a void*) for situations in which we may not want to pass
references to a structure?

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list