diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2015-04-19 02:30:26 -0300 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2015-04-19 02:30:26 -0300 |
commit | 1826b5ad70ebd5db751ed0d4eee6f857a7001100 (patch) | |
tree | 90cdf5cac51ed30ca12d4ea390f65bbca5242de4 /src/utils/utils.h | |
parent | 86b551fdf2a8bf5c6e3cebcc463ee830d65ced94 (diff) | |
download | blogc-1826b5ad70ebd5db751ed0d4eee6f857a7001100.tar.gz blogc-1826b5ad70ebd5db751ed0d4eee6f857a7001100.tar.bz2 blogc-1826b5ad70ebd5db751ed0d4eee6f857a7001100.zip |
remove specific type used to store sources
Diffstat (limited to 'src/utils/utils.h')
-rw-r--r-- | src/utils/utils.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/utils/utils.h b/src/utils/utils.h index 7e61a67..03f1639 100644 --- a/src/utils/utils.h +++ b/src/utils/utils.h @@ -15,6 +15,8 @@ #define B_STRING_CHUNK_SIZE 128 +typedef void (*b_free_func_t) (void *ptr); + typedef struct _b_slist_t { struct _b_slist_t *next; void *data; @@ -34,11 +36,11 @@ typedef struct _b_trie_node_t { typedef struct _b_trie_t { b_trie_node_t *root; - void (*free_func)(void *ptr); + b_free_func_t free_func; } b_trie_t; b_slist_t* b_slist_append(b_slist_t *l, void *data); -void b_slist_free_full(b_slist_t *l, void (*free_func)(void *ptr)); +void b_slist_free_full(b_slist_t *l, b_free_func_t free_func); void b_slist_free(b_slist_t *l); unsigned int b_slist_length(b_slist_t *l); @@ -62,7 +64,7 @@ b_string_t* b_string_append(b_string_t *str, const char *suffix); b_string_t* b_string_append_c(b_string_t *str, char c); b_string_t* b_string_append_printf(b_string_t *str, const char *format, ...); -b_trie_t* b_trie_new(void (*free_func)(void *ptr)); +b_trie_t* b_trie_new(b_free_func_t free_func); void b_trie_free(b_trie_t *trie); void b_trie_insert(b_trie_t *trie, const char *key, void *data); void* b_trie_lookup(b_trie_t *trie, const char *key); |