]> rtime.felk.cvut.cz Git - ulut.git/commitdiff
uLUt: hash table add _get_count and remove unimplemented _delete_node prototype.
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Thu, 5 Nov 2015 11:05:53 +0000 (12:05 +0100)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Thu, 5 Nov 2015 11:05:53 +0000 (12:05 +0100)
The prototype cause warning when UL_HASTAB_CUST_NODE_INT_DEC_SCOPE
is used with static inline.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
ulut/ul_hashtab.h

index 4e37effb7b22c523dfb88177a8b5ca25459211d4..4aa7c534573a800e1a6c4e59ddc3f60e4222ff34 100644 (file)
@@ -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;\