aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-05 17:41:53 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-06 22:08:36 +0100
commit02db0ae8ff83a42913b1b4224ccd8377f5fc5323 (patch)
tree27d8454d8d8033d33a58a852864cd6450df22709 /include
parent378db7c6ab1336ce99136118a9b66901630ffc85 (diff)
Add a copy function to the rb-tree implementation
If we use the rb-tree in libsquashfs objects, we need to be able top copy an entire tree as part of the object. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/rbtree.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/rbtree.h b/include/rbtree.h
index 7fe1752..bbba711 100644
--- a/include/rbtree.h
+++ b/include/rbtree.h
@@ -49,6 +49,8 @@ SQFS_INTERNAL int rbtree_init(rbtree_t *tree, size_t keysize, size_t valuesize,
SQFS_INTERNAL void rbtree_cleanup(rbtree_t *tree);
+SQFS_INTERNAL int rbtree_copy(const rbtree_t *tree, rbtree_t *out);
+
SQFS_INTERNAL int rbtree_insert(rbtree_t *tree, const void *key,
const void *value);