Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ht_pp.h include from rz_list.h #4441

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions librz/include/rz_cons.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extern "C" {
#include <rz_vector.h>
#include <sdb.h>
#include <rz_util/ht_up.h>
#include <rz_util/ht_pp.h>

#include <stdio.h>
#include <sys/types.h>
Expand Down
1 change: 0 additions & 1 deletion 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 <rz_util/ht_pp.h>
#include <ls.h>

#ifdef __cplusplus
Expand Down
22 changes: 11 additions & 11 deletions test/unit/test_sdb_sdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ bool test_sdb_foreach_filter_user(void) {
sdb_set(db, "big", "horse", 0);
SdbList *ls = sdb_foreach_list_filter_user(db, foreach_filter_user_cb, true, db);
SdbListIter *it = ls_iterator(ls);
HtPPKv *kv = ls_iter_get(it);
mu_assert_streq((const char *)kv->key, "bar", "list should be sorted");
mu_assert_streq((const char *)kv->value, "cow", "list should be filtered");
SdbKv *kv = ls_iter_get(it);
mu_assert_streq(sdbkv_key(kv), "bar", "list should be sorted");
mu_assert_streq(sdbkv_value(kv), "cow", "list should be filtered");
kv = ls_iter_get(it);
mu_assert_streq((const char *)kv->key, "bip", "list should be sorted");
mu_assert_streq((const char *)kv->value, "cow", "list should be filtered");
mu_assert_streq(sdbkv_key(kv), "bip", "list should be sorted");
mu_assert_streq(sdbkv_value(kv), "cow", "list should be filtered");
kv = ls_iter_get(it);
mu_assert_streq((const char *)kv->key, "boo", "list should be sorted");
mu_assert_streq((const char *)kv->value, "cow", "list should be filtered");
mu_assert_streq(sdbkv_key(kv), "boo", "list should be sorted");
mu_assert_streq(sdbkv_value(kv), "cow", "list should be filtered");
mu_assert_null(it, "list should be terminated");
ls_free(ls);
sdb_free(db);
Expand All @@ -209,12 +209,12 @@ bool test_sdb_foreach_filter(void) {
sdb_set(db, "bip", "cow", 0);
SdbList *ls = sdb_foreach_list_filter(db, foreach_filter_cb, true);
SdbListIter *it = ls_iterator(ls);
HtPPKv *kv = ls_iter_get(it);
mu_assert_streq((const char *)kv->key, "bar", "list should be sorted");
SdbKv *kv = ls_iter_get(it);
mu_assert_streq(sdbkv_key(kv), "bar", "list should be sorted");
kv = ls_iter_get(it);
mu_assert_streq((const char *)kv->key, "bip", "list should be sorted");
mu_assert_streq(sdbkv_key(kv), "bip", "list should be sorted");
kv = ls_iter_get(it);
mu_assert_streq((const char *)kv->key, "boo", "list should be sorted");
mu_assert_streq(sdbkv_key(kv), "boo", "list should be sorted");
mu_assert_null(it, "list should be terminated");
ls_free(ls);
sdb_free(db);
Expand Down
Loading