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:
Patrick Pelissier committed 2017-10-18 23:25:39 +02:00
1 parent 8265ccbb42
commit 8914d336a0
7 files changed
+32 -33

No files matched your search

+2 -2
View File
@@ -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;