aboutsummaryrefslogtreecommitdiff
path: root/src/gdbmcount.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gdbmcount.c')
-rw-r--r--src/gdbmcount.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gdbmcount.c b/src/gdbmcount.c
index 4a78bc0..c81a461 100644
--- a/src/gdbmcount.c
+++ b/src/gdbmcount.c
@@ -40,3 +40,19 @@ gdbm_count (GDBM_FILE dbf, gdbm_count_t *pcount)
40 *pcount = count; 40 *pcount = count;
41 return 0; 41 return 0;
42} 42}
43
44int
45gdbm_bucket_count (GDBM_FILE dbf, size_t *pcount)
46{
47 int i;
48 size_t count = 0;
49
50 GDBM_ASSERT_CONSISTENCY (dbf, -1);
51
52 for (i = 0; i < GDBM_DIR_COUNT (dbf); i = _gdbm_next_bucket_dir (dbf, i))
53 {
54 ++count;
55 }
56 *pcount = count;
57 return 0;
58}

Return to:

Send suggestions and report system problems to the System administrator.