Let the iter point to the first object.
This commit is contained in:
parent
adbd417825
commit
27053629d0
2 changed files with 2 additions and 3 deletions
|
@ -358,10 +358,10 @@ cfw_map_set(CFWMap *map, void *key, void *obj)
|
|||
void
|
||||
cfw_map_iter(CFWMap *map, cfw_map_iter_t *iter)
|
||||
{
|
||||
iter->key = NULL;
|
||||
iter->obj = NULL;
|
||||
iter->_map = map;
|
||||
iter->_pos = 0;
|
||||
|
||||
cfw_map_iter_next(iter);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -38,7 +38,6 @@ print_map(CFWMap *map)
|
|||
cfw_map_iter_t iter;
|
||||
|
||||
cfw_map_iter(map, &iter);
|
||||
cfw_map_iter_next(&iter);
|
||||
|
||||
fputs("{\n", stdout);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue