Skip to content

Commit

Permalink
Remove rz_list_of_sdblist API (#4442)
Browse files Browse the repository at this point in the history
  • Loading branch information
pelijah committed Apr 18, 2024
1 parent 77f8f80 commit c9f11ef
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 @@ -2,7 +2,6 @@
#define RZ_LIST_H

#include <rz_types.h>
#include <ls.h>

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -100,7 +99,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 c9f11ef

Please sign in to comment.