summaryrefslogtreecommitdiff
path: root/oidset.h
diff options
context:
space:
mode:
Diffstat (limited to 'oidset.h')
-rw-r--r--oidset.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/oidset.h b/oidset.h
index 4b90540cd4..c9d0f6d3cc 100644
--- a/oidset.h
+++ b/oidset.h
@@ -38,12 +38,13 @@ struct oidset {
#define OIDSET_INIT { { 0 } }
-static inline void oidset_init(struct oidset *set, size_t initial_size)
-{
- memset(&set->set, 0, sizeof(set->set));
- if (initial_size)
- kh_resize_oid(&set->set, initial_size);
-}
+/**
+ * Initialize the oidset structure `set`.
+ *
+ * If `initial_size` is bigger than 0 then preallocate to allow inserting
+ * the specified number of elements without further allocations.
+ */
+void oidset_init(struct oidset *set, size_t initial_size);
/**
* Returns true iff `set` contains `oid`.