Skip to content

Commit

Permalink
Remove rz_list_of_sdblist API
Browse files Browse the repository at this point in the history
  • Loading branch information
pelijah authored Apr 18, 2024
1 parent 2cacf88 commit a834ba6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions librz/include/rz_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include <rz_types.h>
#include <rz_util/ht_pp.h>
#include <ls.h>

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -101,7 +100,6 @@ RZ_API RZ_OWN void *rz_list_pop_head(RZ_NONNULL RzList *list);
RZ_API void rz_list_reverse(RZ_NONNULL RzList *list);
RZ_API RZ_OWN RzList *rz_list_clone(RZ_NONNULL const RzList *list);
RZ_API RZ_OWN char *rz_list_to_str(RZ_NONNULL RzList *list, char ch);
RZ_API RZ_OWN RzList *rz_list_of_sdblist(SdbList *sl);

/* hashlike api */
RZ_API RZ_BORROW RzListIter *rz_list_contains(RZ_NONNULL const RzList *list, RZ_NONNULL const void *ptr);
Expand Down
14 changes: 0 additions & 14 deletions librz/util/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,17 +802,3 @@ RZ_API RZ_OWN char *rz_list_to_str(RZ_NONNULL RzList *list, char ch) {
}
return rz_strbuf_drain(buf);
}

/**
* \brief Converts a SdbList into a RzList
*
**/
RZ_API RZ_OWN RzList *rz_list_of_sdblist(SdbList *sl) {
RzList *l = rz_list_newf(free);
SdbKv *kv;
SdbListIter *iter;
ls_foreach (sl, iter, kv) {
rz_list_append(l, strdup(sdbkv_key(kv)));
}
return l;
}

0 comments on commit a834ba6

Please sign in to comment.