NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/47144 (rbtree itteration is broken)
RB_TREE_MIN and RB_TREE_MAX also need to be fixed:
Index: rbtree.h
===================================================================
--- rbtree.h (revision 84264)
+++ rbtree.h (working copy)
@@ -95,8 +95,8 @@
} while (/*CONSTCOND*/ 0)
} rb_node_t;
-#define RB_TREE_MIN(T) rb_tree_iterate((T), NULL, RB_DIR_LEFT)
-#define RB_TREE_MAX(T) rb_tree_iterate((T), NULL, RB_DIR_RIGHT)
+#define RB_TREE_MIN(T) rb_tree_iterate((T), NULL, RB_DIR_RIGHT)
+#define RB_TREE_MAX(T) rb_tree_iterate((T), NULL, RB_DIR_LEFT)
#define RB_TREE_FOREACH(N, T) \
for ((N) = RB_TREE_MIN(T); (N); \
(N) = rb_tree_iterate((T), (N), RB_DIR_RIGHT))
On Oct 30, 2012, at 3:12 PM, rmind%NetBSD.org@localhost wrote:
> Synopsis: rbtree itteration is broken
>
> State-Changed-From-To: open->closed
> State-Changed-By: rmind%NetBSD.org@localhost
> State-Changed-When: Tue, 30 Oct 2012 22:12:28 +0000
> State-Changed-Why:
> It is perhaps a bit confusing and unintuitive API behaviour, but the iteration
> is not broken. The problem is wrong documentation, which ought to be fixed.
>
> See PR/46034. Closing this as a duplicate.
>
>
>
Home |
Main Index |
Thread Index |
Old Index