From: Pavel Pisa Date: Thu, 5 Nov 2015 11:05:53 +0000 (+0100) Subject: uLUt: hash table add _get_count and remove unimplemented _delete_node prototype. X-Git-Url: https://rtime.felk.cvut.cz/gitweb/ulut.git/commitdiff_plain/895a8fe0f72a78bf342dd1a62f66e5f386cb043b uLUt: hash table add _get_count and remove unimplemented _delete_node prototype. The prototype cause warning when UL_HASTAB_CUST_NODE_INT_DEC_SCOPE is used with static inline. Signed-off-by: Pavel Pisa --- diff --git a/ulut/ul_hashtab.h b/ulut/ul_hashtab.h index 4e37eff..4aa7c53 100644 --- a/ulut/ul_hashtab.h +++ b/ulut/ul_hashtab.h @@ -111,7 +111,6 @@ typedef struct {\ cust_scope int cust_prefix##_search_node(const cust_table_t *table, cust_key_t const *key, typeof(((cust_item_t*)0)->cust_item_node) **nodep);\ cust_scope cust_item_t *cust_prefix##_find(const cust_table_t *table, cust_key_t const *key);\ cust_scope int cust_prefix##_insert(cust_table_t *table, cust_item_t *item);\ -cust_scope int cust_prefix##_delete_node(cust_table_t *table, gavl_node_t *node);\ cust_scope cust_item_t *cust_prefix##_delete_key(cust_table_t *table, cust_key_t const *key);\ cust_scope int cust_prefix##_delete(cust_table_t *table, cust_item_t *item);\ cust_scope int cust_prefix##_resize_table(cust_table_t *table, ul_hashtab_hashval_t newsize);\ @@ -131,6 +130,12 @@ int cust_prefix##_delete_all(cust_table_t *table)\ } \ \ static inline \ +long cust_prefix##_get_count(cust_table_t *table)\ +{\ + return table->cust_table_field.count;\ +} \ +\ +static inline \ cust_item_t *cust_prefix##_it2item(const cust_prefix##_it_t *it)\ {\ return it->item;\