diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2012-01-21 10:29:24 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2012-01-21 10:29:24 +0100 |
commit | 13fd2c5e21425e27411299081d5b4102f5855179 (patch) | |
tree | a7c9f10b52aa1bb8f364a8eb14a7b6383fbf5ffa /bitmapped_patricia_tree.h | |
parent | d4b7b491099cc9633422dad6687a94392faeece1 (diff) |
Add public function bpt_for_mappings.
Diffstat (limited to 'bitmapped_patricia_tree.h')
-rw-r--r-- | bitmapped_patricia_tree.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bitmapped_patricia_tree.h b/bitmapped_patricia_tree.h index f1d65c3..4807256 100644 --- a/bitmapped_patricia_tree.h +++ b/bitmapped_patricia_tree.h @@ -48,18 +48,19 @@ enum bpt_tag { struct bpt; typedef struct bpt *bpt_t; +// Base functionality. void *bpt_get(bpt_t bpt, bpt_key_t key); bool bpt_has_key(bpt_t bpt, bpt_key_t key); void **bpt_get_pointer(bpt_t bpt, bpt_key_t key); bpt_t bpt_assoc(bpt_t bpt, bpt_key_t key, void *item); bpt_t bpt_dissoc(bpt_t bpt, bpt_key_t key); -void init_bpt_leaf(bpt_t leaf, bpt_key_t key, void *value); -bpt_t bpt_make_leaf(bpt_key_t key, void *value); void bpt_retain(bpt_t bpt); void bpt_release(bpt_t bpt); void bpt_dealloc(bpt_t bpt); void bpt_seal(bpt_t bpt); +// Utilities +void bpt_for_mappings(bpt_t bpt, void (*thunk)(bpt_key_t, void*, void*), void *user_data); #ifdef BPT_ENABLE_DEALLOC_HOOKS void bpt_set_dealloc_hook(bpt_t bpt, bpt_key_t key, void (*hook)(bpt_key_t key, void* value)); #endif |