Skip to content

Commit

Permalink
Fix mismatched function annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
pelijah committed Apr 10, 2024
1 parent 36ad3c9 commit faa6491
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion librz/include/rz_util/ht_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ RZ_API bool Ht_(update)(RZ_NONNULL HtName_(Ht) * ht, const KEY_TYPE key, VALUE_T
// Update the key of an element in the hashtable
RZ_API bool Ht_(update_key)(RZ_NONNULL HtName_(Ht) * ht, const KEY_TYPE old_key, const KEY_TYPE new_key);
// Delete a key from the hashtable.
RZ_API bool Ht_(delete)(HtName_(Ht) * ht, const KEY_TYPE key);
RZ_API bool Ht_(delete)(RZ_NONNULL HtName_(Ht) * ht, const KEY_TYPE key);
// Find the value corresponding to the matching key.
RZ_API VALUE_TYPE Ht_(find)(RZ_NONNULL HtName_(Ht) * ht, const KEY_TYPE key, RZ_NULLABLE bool *found);
// Iterates over all elements in the hashtable, calling the cb function on each Kv.
Expand Down
2 changes: 1 addition & 1 deletion librz/util/ht/ht_inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ RZ_API RZ_BORROW HT_(Kv) * Ht_(find_kv)(RZ_NONNULL HtName_(Ht) * ht, const KEY_T
* If \p found is not NULL, it will be set to true if the entry was found,
* false otherwise.
*/
RZ_API RZ_BORROW VALUE_TYPE Ht_(find)(RZ_NONNULL HtName_(Ht) * ht, const KEY_TYPE key, RZ_NULLABLE bool *found) {
RZ_API VALUE_TYPE Ht_(find)(RZ_NONNULL HtName_(Ht) * ht, const KEY_TYPE key, RZ_NULLABLE bool *found) {
HT_(Kv) *res = Ht_(find_kv)(ht, key, found);
return res ? res->value : HT_NULL_VALUE;
}
Expand Down
2 changes: 1 addition & 1 deletion librz/util/ht/ht_sp.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static void fini_kv_val(HT_(Kv) *kv, void *user) {
* \param dup_val Function to making copy of a value when inserting
* \param free_val Function to releasing a stored value
*/
RZ_API RZ_OWN HtName_(Ht) * Ht_(new)(HtStrOption key_opt, HT_(DupValue) dup_val, HT_(FreeValue) free_val) {
RZ_API RZ_OWN HtName_(Ht) * Ht_(new)(HtStrOption key_opt, RZ_NULLABLE HT_(DupValue) dup_val, RZ_NULLABLE HT_(FreeValue) free_val) {
HT_(Options) opt = {
.cmp = (HT_(ListComparator))strcmp,
.hashfn = (HT_(HashFunction))sdb_hash,
Expand Down
2 changes: 1 addition & 1 deletion librz/util/ht/ht_uu.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* \brief Create a new hashtable
*/
RZ_API HtName_(Ht) * Ht_(new)(void) {
RZ_API RZ_OWN HtName_(Ht) * Ht_(new)(void) {
HT_(Options) opt = { 0 };
return Ht_(new_opt)(&opt);
}

0 comments on commit faa6491

Please sign in to comment.