}
}
+/**
+ * calculate shrink and enlarge limits
+ * @internal
+ */
+static INLINE
+void reset_thresholds(HashSet *self)
+{
+ self->enlarge_threshold = (size_t) HT_OCCUPANCY_FLT(self->num_buckets);
+ self->shrink_threshold = (size_t) HT_EMPTY_FLT(self->num_buckets);
+ self->consider_shrink = 0;
+}
+
+#ifndef HAVE_OWN_RESIZE
/**
* Inserts an element into a hashset under the assumption that the hashset
* contains no deleted entries and the element doesn't exist in the hashset yet.
}
}
-/**
- * calculate shrink and enlarge limits
- * @internal
- */
-static INLINE
-void reset_thresholds(HashSet *self)
-{
- self->enlarge_threshold = (size_t) HT_OCCUPANCY_FLT(self->num_buckets);
- self->shrink_threshold = (size_t) HT_EMPTY_FLT(self->num_buckets);
- self->consider_shrink = 0;
-}
-
-#ifndef HAVE_OWN_RESIZE
/**
* Resize the hashset
* @internal
* Resize the hashset
* @internal
*/
-static INLINE
+static
void resize(HashSet *self, size_t new_size)
{
- size_t num_buckets = self->num_buckets;
HashSetEntry *old_entries = self->entries;
HashSetEntry *new_entries;
list_head list = self->elem_list;
* Resize the hashset
* @internal
*/
-static INLINE
+static
void resize(HashSet *self, size_t new_size)
{
- size_t num_buckets = self->num_buckets;
HashSetEntry *old_entries = self->entries;
HashSetEntry *new_entries;
list_head list = self->elem_list;
* Resize the hashset
* @internal
*/
-static INLINE
+static
void resize(HashSet *self, size_t new_size)
{
- size_t num_buckets = self->num_buckets;
HashSetEntry *old_entries = self->entries;
HashSetEntry *new_entries;
list_head list = self->elem_list;