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 unused c hash functions #995

Merged
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: 0 additions & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ foreach(
ert_util_clamp
ert_util_chdir
ert_util_filename
ert_util_hash_test
ert_util_parent_path
ert_util_realpath
ert_util_relpath_test
Expand Down
30 changes: 0 additions & 30 deletions lib/include/ert/util/hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,58 +12,28 @@ extern "C" {

typedef struct hash_struct hash_type;
typedef struct hash_iter_struct hash_iter_type;
typedef void(hash_apply_ftype)(void *);

UTIL_SAFE_CAST_HEADER(hash);
UTIL_SAFE_CAST_HEADER_CONST(hash);

hash_type *hash_alloc(void);
void hash_iter_complete(hash_type *);
void hash_free(hash_type *);
void hash_free__(void *);
void hash_insert_ref(hash_type *, const char *, const void *);
void hash_insert_copy(hash_type *, const char *, const void *, copyc_ftype *,
free_ftype *);
void hash_insert_string(hash_type *, const char *, const char *);
bool hash_has_key(const hash_type *, const char *);
void *hash_pop(hash_type *hash, const char *key);
void *hash_safe_get(const hash_type *hash, const char *key);
void *hash_get(const hash_type *, const char *);
char *hash_get_string(const hash_type *, const char *);
void hash_del(hash_type *, const char *);
void hash_safe_del(hash_type *, const char *);
void hash_clear(hash_type *);
int hash_get_size(const hash_type *);
void hash_set_keylist(const hash_type *, char **);
char **hash_alloc_keylist(const hash_type *);
stringlist_type *hash_alloc_stringlist(const hash_type *);

char **hash_alloc_sorted_keylist(const hash_type *hash,
int(hash_get_cmp_value)(const void *));
char **hash_alloc_key_sorted_list(const hash_type *hash,
int (*cmp)(const void *, const void *));
bool hash_key_list_compare(const hash_type *hash1, const hash_type *hash2);
void hash_insert_hash_owned_ref(hash_type *, const char *, const void *,
free_ftype *);
void hash_resize(hash_type *hash, int new_size);

hash_iter_type *hash_iter_alloc(const hash_type *);
void hash_iter_free(hash_iter_type *);
bool hash_iter_is_complete(const hash_iter_type *);
const char *hash_iter_get_next_key(hash_iter_type *);
void *hash_iter_get_next_value(hash_iter_type *);
void hash_iter_restart(hash_iter_type *iter);

hash_type *hash_alloc_from_options(const stringlist_type *);
bool hash_add_option(hash_type *hash, const char *key_value);

int hash_inc_counter(hash_type *hash, const char *counter_key);
int hash_get_counter(const hash_type *hash, const char *key);
void hash_insert_int(hash_type *, const char *, int);
int hash_get_int(const hash_type *, const char *);
void hash_insert_double(hash_type *, const char *, double);
double hash_get_double(const hash_type *, const char *);
void hash_apply(hash_type *hash, hash_apply_ftype *func);

UTIL_IS_INSTANCE_HEADER(hash);

Expand Down
3 changes: 0 additions & 3 deletions lib/include/ert/util/hash_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@ typedef enum {

bool hash_node_key_eq(const hash_node_type *, uint32_t, const char *);
hash_node_type *hash_node_get_next(const hash_node_type *);
uint32_t hash_node_get_insert_nr(const hash_node_type *);
void hash_node_set_next(hash_node_type *, const hash_node_type *);
hash_node_type *hash_node_alloc_new(const char *, node_data_type *,
hashf_type *, uint32_t);
void hash_node_set_insert_nr(hash_node_type *, uint32_t);
uint32_t hash_node_get_table_index(const hash_node_type *);
uint32_t hash_node_get_global_index(const hash_node_type *);
const char *hash_node_get_key(const hash_node_type *);
node_data_type *hash_node_get_data(const hash_node_type *);
void hash_node_free(hash_node_type *);
Expand Down
1 change: 0 additions & 1 deletion lib/include/ert/util/hash_sll.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ hash_sll_type **hash_sll_alloc_table(int);
void hash_sll_del_node(hash_sll_type *, hash_node_type *);
void hash_sll_add_node(hash_sll_type *, hash_node_type *);
void hash_sll_free(hash_sll_type *);
bool hash_sll_has_key(const hash_sll_type *, uint32_t, const char *);
bool hash_sll_empty(const hash_sll_type *hash_sll);
hash_node_type *hash_sll_get(const hash_sll_type *, uint32_t, const char *);
hash_node_type *hash_sll_get_head(const hash_sll_type *);
Expand Down
26 changes: 0 additions & 26 deletions lib/util/dependencies

This file was deleted.

Loading