summaryrefslogtreecommitdiff
path: root/cbtree.h
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-12-07 18:38:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-12-07 23:18:35 (GMT)
commit2c68f577fc8a400f4d354f4700e4809c1bfd6470 (patch)
treeda5158980e4999518393365b8d60c499e988afc2 /cbtree.h
parente9d7761bb94f20acc98824275e317fa82436c25d (diff)
downloadgit-2c68f577fc8a400f4d354f4700e4809c1bfd6470.zip
git-2c68f577fc8a400f4d354f4700e4809c1bfd6470.tar.gz
git-2c68f577fc8a400f4d354f4700e4809c1bfd6470.tar.bz2
cbtree: remove broken and unused cb_unlink
cb_unlink is broken once a node is no longer self-referential due to subsequent insertions. This is a consequence of an intrusive implementation and I'm not sure if it's easily fixable while retaining our cache-friendly intrusive property (I've tried for several hours in another project). In any case, we're not using cb_unlink anywhere in our codebase, just get rid of it to avoid misleading future readers. Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cbtree.h')
-rw-r--r--cbtree.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/cbtree.h b/cbtree.h
index dedbb8e..0be14fb 100644
--- a/cbtree.h
+++ b/cbtree.h
@@ -47,7 +47,6 @@ static inline void cb_init(struct cb_tree *t)
struct cb_node *cb_lookup(struct cb_tree *, const uint8_t *k, size_t klen);
struct cb_node *cb_insert(struct cb_tree *, struct cb_node *, size_t klen);
-struct cb_node *cb_unlink(struct cb_tree *t, const uint8_t *k, size_t klen);
typedef enum cb_next (*cb_iter)(struct cb_node *, void *arg);