summaryrefslogtreecommitdiff
path: root/src/ucl_hash.h
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2026-01-07 19:19:44 +0100
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2026-01-07 19:19:44 +0100
commit1dd83cf7e527ff29d734f6a2c8f9b61d39b41d94 (patch)
treeda5185757a055488bdc9cbb7d17077a8f36596a9 /src/ucl_hash.h
parent1e2f270469c61337ef7f5f92ab93f691e5d86492 (diff)
Diffstat (limited to 'src/ucl_hash.h')
-rw-r--r--src/ucl_hash.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/ucl_hash.h b/src/ucl_hash.h
index 8f6d69e21a25..95fe206b677e 100644
--- a/src/ucl_hash.h
+++ b/src/ucl_hash.h
@@ -31,9 +31,9 @@
struct ucl_hash_node_s;
typedef struct ucl_hash_node_s ucl_hash_node_t;
-typedef int (*ucl_hash_cmp_func) (const void* void_a, const void* void_b);
-typedef void (*ucl_hash_free_func) (void *ptr);
-typedef void* ucl_hash_iter_t;
+typedef int (*ucl_hash_cmp_func)(const void *void_a, const void *void_b);
+typedef void (*ucl_hash_free_func)(void *ptr);
+typedef void *ucl_hash_iter_t;
/**
@@ -46,36 +46,36 @@ typedef struct ucl_hash_struct ucl_hash_t;
/**
* Initializes the hashtable.
*/
-ucl_hash_t* ucl_hash_create (bool ignore_case);
+ucl_hash_t *ucl_hash_create(bool ignore_case);
/**
* Deinitializes the hashtable.
*/
-void ucl_hash_destroy (ucl_hash_t* hashlin, ucl_hash_free_func func);
+void ucl_hash_destroy(ucl_hash_t *hashlin, ucl_hash_free_func func);
/**
* Inserts an element in the the hashtable.
* @return true on success, false on failure (i.e. ENOMEM)
*/
-bool ucl_hash_insert (ucl_hash_t* hashlin, const ucl_object_t *obj, const char *key,
- unsigned keylen);
+bool ucl_hash_insert(ucl_hash_t *hashlin, const ucl_object_t *obj, const char *key,
+ unsigned keylen);
/**
* Replace element in the hash
*/
-void ucl_hash_replace (ucl_hash_t* hashlin, const ucl_object_t *old,
- const ucl_object_t *new);
+void ucl_hash_replace(ucl_hash_t *hashlin, const ucl_object_t *old,
+ const ucl_object_t *new);
/**
* Delete an element from the the hashtable.
*/
-void ucl_hash_delete (ucl_hash_t* hashlin, const ucl_object_t *obj);
+void ucl_hash_delete(ucl_hash_t *hashlin, const ucl_object_t *obj);
/**
* Searches an element in the hashtable.
*/
-const ucl_object_t* ucl_hash_search (ucl_hash_t* hashlin, const char *key,
- unsigned keylen);
+const ucl_object_t *ucl_hash_search(ucl_hash_t *hashlin, const char *key,
+ unsigned keylen);
/**
@@ -85,7 +85,7 @@ const ucl_object_t* ucl_hash_search (ucl_hash_t* hashlin, const char *key,
* @param ep pointer record exception (such as ENOMEM), could be NULL
* @return the next object
*/
-const void* ucl_hash_iterate2 (ucl_hash_t *hashlin, ucl_hash_iter_t *iter, int *ep);
+const void *ucl_hash_iterate2(ucl_hash_t *hashlin, ucl_hash_iter_t *iter, int *ep);
/**
* Helper macro to support older code
@@ -95,15 +95,15 @@ const void* ucl_hash_iterate2 (ucl_hash_t *hashlin, ucl_hash_iter_t *iter, int *
/**
* Check whether an iterator has next element
*/
-bool ucl_hash_iter_has_next (ucl_hash_t *hashlin, ucl_hash_iter_t iter);
+bool ucl_hash_iter_has_next(ucl_hash_t *hashlin, ucl_hash_iter_t iter);
/**
* Reserves space in hash
* @return true on sucess, false on failure (e.g. ENOMEM)
* @param hashlin
*/
-bool ucl_hash_reserve (ucl_hash_t *hashlin, size_t sz);
+bool ucl_hash_reserve(ucl_hash_t *hashlin, size_t sz);
-void ucl_hash_sort (ucl_hash_t *hashlin, enum ucl_object_keys_sort_flags fl);
+void ucl_hash_sort(ucl_hash_t *hashlin, enum ucl_object_keys_sort_flags fl);
#endif