summaryrefslogtreecommitdiff
path: root/src/rax.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2017-09-05 13:14:13 +0200
committerantirez <antirez@gmail.com>2017-12-01 10:24:24 +0100
commit485014cc74d05436afc8257c5d7b05370410adc7 (patch)
treef00cda6c2806a3b94a31a0e4251c93c7fd1bdd5e /src/rax.c
parent100d43c1ac48e8e949bd622b302ba309ae498752 (diff)
downloadredis-485014cc74d05436afc8257c5d7b05370410adc7.tar.gz
Streams: RDB saving.
Diffstat (limited to 'src/rax.c')
-rw-r--r--src/rax.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rax.c b/src/rax.c
index b4f5ae05d..3ead27ed7 100644
--- a/src/rax.c
+++ b/src/rax.c
@@ -1655,6 +1655,11 @@ int raxEOF(raxIterator *it) {
return it->flags & RAX_ITER_EOF;
}
+/* Return the number of elements inside the radix tree. */
+uint64_t raxSize(rax *rax) {
+ return rax->numele;
+}
+
/* ----------------------------- Introspection ------------------------------ */
/* This function is mostly used for debugging and learning purposes.