pike.git
/
src
/
post_modules
/
CritBit
/
tree_low.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/post_modules/CritBit/tree_low.c:137:
/* printf("adding %p\n", _); */ cb_insert(dst, _->key, &_->value); if (_ == end) break; } }); /* printf("new range has %d members.\n", dst->root->size); */ } }
-
static inline cb_node_t cb_node_from_string(const struct cb_tree * tree,
+
static inline cb_node_t cb_node_from_string(const struct cb_tree *
UNUSED(
tree
)
,
const cb_key s, const cb_value * val) { cb_node_t node = node_init(); CB_SET_KEY(node, s); node->size = 1; CB_SET_VALUE(node, val); #ifdef DEBUG_CHECKS if (!CB_HAS_VALUE(node)) printf("culprit here. %d\n", __LINE__); #endif return node; }
-
static inline cb_node_t cb_clone_node(const struct cb_tree * tree,
+
static inline cb_node_t cb_clone_node(const struct cb_tree *
UNUSED(
tree
)
,
const cb_node_t node) { cb_node_t nnode = CB_NODE_ALLOC(); memcpy(nnode, node, sizeof(cb_node)); CB_ADD_KEY_REF(node->key); CB_INIT_VALUE(node); CB_SET_CHILD(nnode, 0, CB_CHILD(nnode, 0)); CB_SET_CHILD(nnode, 1, CB_CHILD(nnode, 1)); CB_SET_CHILD(node, 0, NULL); CB_SET_CHILD(node, 1, NULL);
pike.git/src/post_modules/CritBit/tree_low.c:205:
cb_free_node(tree, CB_CHILD(node, 0)); CB_SET_CHILD(node, 0, NULL); } if (CB_HAS_CHILD(node, 1)) { cb_free_node(tree, CB_CHILD(node, 1)); CB_SET_CHILD(node, 1, NULL); } cb_zap_node(tree, node); }
-
static inline void cb_zap_node(const struct cb_tree * tree, cb_node_t node) {
+
static inline void cb_zap_node(const struct cb_tree *
UNUSED(
tree
)
,
+
cb_node_t node) {
CB_FREE_KEY(node->key); CB_RM_VALUE(node); CB_NODE_FREE(node); } CB_STATIC CB_INLINE cb_node_t cb_find_first(cb_node_t tree) { while (tree && !CB_HAS_VALUE(tree)) { tree = CB_CHILD(tree, 0); }; return tree; }