1.1 --- a/ucx/map.h Mon Jul 15 13:53:51 2013 +0200 1.2 +++ b/ucx/map.h Mon Jul 15 14:25:50 2013 +0200 1.3 @@ -38,8 +38,8 @@ 1.4 extern "C" { 1.5 #endif 1.6 1.7 -#define UCX_MAP_FOREACH(elm,iter) \ 1.8 - for(;ucx_map_iter_next(&iter,(void**)&elm)==0;) 1.9 +#define UCX_MAP_FOREACH(key,elm,iter) \ 1.10 + for(UcxKey key;ucx_map_iter_next(&iter,&key, (void**)&elm)==0;) 1.11 1.12 typedef struct UcxMap UcxMap; 1.13 typedef struct UcxKey UcxKey; 1.14 @@ -120,7 +120,7 @@ 1.15 1.16 UcxMapIterator ucx_map_iterator(UcxMap *map); 1.17 1.18 -int ucx_map_iter_next(UcxMapIterator *i, void **elm); 1.19 +int ucx_map_iter_next(UcxMapIterator *i, UcxKey *key, void **elm); 1.20 1.21 /* use macros for string maps only, values are not encoded */ 1.22 #define ucx_map_load(map, f, alloc) ucx_map_load_enc(map, f, alloc, NULL, NULL)