Skip to content

Commit

Permalink
Fix up free functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Sep 24, 2024
1 parent 2f84caf commit 8f96064
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions librz/include/rz_util/ht_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ RZ_API HtRetCode Ht_(insert_kv_ex)(RZ_NONNULL HtName_(Ht) *ht, RZ_NONNULL HT_(Kv

RZ_API RZ_OWN HT_(IterMutState) *Ht_(new_iter_mut_state)(RZ_NONNULL HtName_(Ht) *ht);
RZ_API RZ_OWN HT_(IterState) *Ht_(new_iter_state)(const RZ_NONNULL HtName_(Ht) *ht);
RZ_API void Ht_(free_iter_mut_state)(RZ_NULLABLE HT_(IterMutState) *state);
RZ_API void Ht_(free_iter_state)(RZ_NULLABLE HT_(IterState) *state);

RZ_API RZ_BORROW VALUE_TYPE *Ht_(iter_next_mut)(RzIterator *it);
Expand Down
8 changes: 1 addition & 7 deletions librz/util/ht/ht_inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,17 +646,11 @@ RZ_API RZ_OWN HT_(IterState) *Ht_(new_iter_state)(const RZ_NONNULL HtName_(Ht) *
return state;
}

RZ_API void Ht_(free_iter_mut_state)(HT_(IterMutState) *state) {
if (!state) {
return;
}
RZ_API void Ht_(free_iter_mut_state)(RZ_NULLABLE HT_(IterMutState) *state) {
free(state);
}

RZ_API void Ht_(free_iter_state)(RZ_NULLABLE HT_(IterState) *state) {
if (!state) {
return;
}
free(state);
}

Expand Down

0 comments on commit 8f96064

Please sign in to comment.