Commit 57a1b0f3 authored by Rusty Russell's avatar Rusty Russell

htable: add htable_type _delval.

To match the raw delval
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 1cebc089
......@@ -35,6 +35,9 @@
* bool <name>_del(struct <name> *ht, const <type> *e);
* bool <name>_delkey(struct <name> *ht, const <keytype> *k);
*
* Delete by iterator:
* bool <name>_delval(struct <name> *ht, struct <name>_iter *i);
*
* Find and return the (first) matching element, or NULL:
* type *<name>_get(const struct @name *ht, const <keytype> *k);
*
......@@ -147,6 +150,11 @@
return name##_del(ht, elem); \
return false; \
} \
static inline UNNEEDED void name##_delval(struct name *ht, \
struct name##_iter *iter) \
{ \
htable_delval(&ht->raw, &iter->i); \
} \
static inline UNNEEDED type *name##_pick(const struct name *ht, \
size_t seed, \
struct name##_iter *iter) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment