From 387ad7fb73b0c0e59db24a378c6dadfe6e70290b Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Thu, 31 Dec 2009 12:46:05 +0100 Subject: [PATCH] uLUt: corrected function scope of hash table next by iterator. Signed-off-by: Pavel Pisa --- ulut/ul_hashtab.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ulut/ul_hashtab.h b/ulut/ul_hashtab.h index 95ac2b8..1f2a559 100644 --- a/ulut/ul_hashtab.h +++ b/ulut/ul_hashtab.h @@ -115,7 +115,6 @@ 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);\ -cust_scope void cust_prefix##_next_it(cust_prefix##_it_t *it);\ cust_scope int cust_prefix##_find_it(cust_table_t *container, cust_key_t const *key, cust_prefix##_it_t *it);\ cust_scope void cust_prefix##_delete_it(cust_prefix##_it_t *it);\ \ @@ -144,20 +143,21 @@ cust_prefix##_is_end_it(cust_prefix##_it_t *it)\ } \ \ static inline void \ -cust_prefix##_first_it(cust_table_t *container, cust_prefix##_it_t *it)\ -{\ - it->container=container;\ - it->item=NULL;\ - cust_prefix##_next_it(it);\ -} \ -\ -void cust_prefix##_next_it(cust_prefix##_it_t *it) \ +cust_prefix##_next_it(cust_prefix##_it_t *it) \ { \ gavl_node_t *treenode; \ treenode=ul_hashtab_next_it_primitive(\ &it->container->cust_table_field, &it->ptreeroot, \ it->item!=NULL?&it->item->cust_item_node.treenode: NULL); \ it->item=treenode!=NULL?UL_CONTAINEROF(treenode, cust_item_t, cust_item_node.treenode):NULL;\ +} \ +\ +static inline void \ +cust_prefix##_first_it(cust_table_t *container, cust_prefix##_it_t *it)\ +{\ + it->container=container;\ + it->item=NULL;\ + cust_prefix##_next_it(it);\ } #define UL_HASTAB_CUST_NODE_INT_DEC(cust_prefix, cust_table_t, cust_item_t, cust_key_t,\ -- 2.39.2