Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
bb401ab3
Unverified
Commit
bb401ab3
authored
Nov 10, 2021
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vtree.h: remove red/black tree augmentation entirely
As agreed with phk
parent
b474c9cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
21 deletions
+0
-21
vtree.h
include/vtree.h
+0
-21
No files found.
include/vtree.h
View file @
bb401ab3
...
...
@@ -365,23 +365,6 @@ struct { \
VRBT_RED_LEFT(VRBT_PARENT(elm, field), field) : \
VRBT_RED_RIGHT(VRBT_PARENT(elm, field), field))
/*
* Something to be invoked in a loop at the root of every modified subtree,
* from the bottom up to the root, to update augmented node data.
*/
#ifndef VRBT_AUGMENT
#define VRBT_AUGMENT(x) do {} while (0)
#define VRBT_AUGMENT_UP(x) do {} while (0)
#else
#define VRBT_AUGMENT_UP(x) \
do { \
while((x) != NULL) { \
VRBT_AUGMENT(x); \
x = VRBT_PARENT(x, field); \
} \
} while (0)
#endif
#define VRBT_SWAP_CHILD(head, out, in, field) do { \
if (VRBT_PARENT(out, field) == NULL) \
VRBT_ROOT(head) = (in); \
...
...
@@ -400,7 +383,6 @@ struct { \
VRBT_SWAP_CHILD(head, elm, tmp, field); \
VRBT_LEFT(tmp, field) = (elm); \
VRBT_SET_PARENT(elm, tmp, field); \
VRBT_AUGMENT(elm); \
} while (
/*CONSTCOND*/
0)
#define VRBT_ROTATE_RIGHT(head, elm, tmp, field) do { \
...
...
@@ -412,7 +394,6 @@ struct { \
VRBT_SWAP_CHILD(head, elm, tmp, field); \
VRBT_RIGHT(tmp, field) = (elm); \
VRBT_SET_PARENT(elm, tmp, field); \
VRBT_AUGMENT(elm); \
} while (
/*CONSTCOND*/
0)
/* Generates prototypes and inline functions */
...
...
@@ -640,7 +621,6 @@ name##_VRBT_REMOVE(struct name *head, struct type *elm) \
VRBT_SET_PARENT(child, parent, field); \
if (parent != NULL) \
name##_VRBT_REMOVE_COLOR(head, parent, child); \
VRBT_AUGMENT_UP(parent); \
return (old); \
}
...
...
@@ -671,7 +651,6 @@ name##_VRBT_INSERT(struct name *head, struct type *elm) \
else \
VRBT_RIGHT(parent, field) = elm; \
name##_VRBT_INSERT_COLOR(head, elm); \
VRBT_AUGMENT_UP(elm); \
return (NULL); \
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment