dict_ref & dict_cref returns a pointer to struct pair_s instead of pair_t (which
is an array of struct pair_s). This will break API compatibility. However: it makes the user code cleaner as a level of indirection is removed. it uniformizes with the OA dict version
This commit is contained in:
1 parent
8265ccbb42
commit
8914d336a0
7 files changed
+32
-33
No files matched your search
+2
-2
@@ -76,8 +76,8 @@ int main(void)
|
||||
printf("Displaying Map by Iterator:\n");
|
||||
for (dict_map_it(it, mp); !dict_map_end_p(it); dict_map_next(it))
|
||||
{
|
||||
const dict_map_pair_t *cref = dict_map_cref(it);
|
||||
printf ("%d : %d\n", (*cref)->key, (*cref)->value);
|
||||
const struct dict_map_pair_s *cref = dict_map_cref(it);
|
||||
printf ("%d : %d\n", cref->key, cref->value);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in new issue
Block a user