X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fstrmap%2Fstrmap.c;h=7f21d1932e089c1961eb5da51cfe2cfb206eb738;hp=872ca544c6aab1fa3b9d813534b74486cf77ec70;hb=140cd1699215bdb2a849459644823b88ab7d42cf;hpb=932aeb6dcc4a6df2d08755f743659451c9721447 diff --git a/ccan/strmap/strmap.c b/ccan/strmap/strmap.c index 872ca544..7f21d193 100644 --- a/ccan/strmap/strmap.c +++ b/ccan/strmap/strmap.c @@ -174,17 +174,19 @@ char *strmap_del_(struct strmap *map, const char *member, void **valuep) } static bool iterate(struct strmap n, - bool (*handle)(const char *, void *, void *), void *data) + bool (*handle)(const char *, void *, void *), + const void *data) { if (n.v) - return handle(n.u.s, n.v, data); + return handle(n.u.s, n.v, (void *)data); return iterate(n.u.n->child[0], handle, data) || iterate(n.u.n->child[1], handle, data); } void strmap_iterate_(const struct strmap *map, - bool (*handle)(const char *, void *, void *), void *data) + bool (*handle)(const char *, void *, void *), + const void *data) { /* Empty map? */ if (!map->u.n)