# HG changeset patch # User Mike Becker # Date 1349352511 -7200 # Node ID 7f90a03e186ecb7438e94b1783193fe80fcce950 # Parent 583718dd4cf32090e6beee29fc4209ddb5f8689e simplified UCX_MAP_FOREACH diff -r 583718dd4cf3 -r 7f90a03e186e test/map_tests.c --- a/test/map_tests.c Thu Oct 04 11:37:23 2012 +0200 +++ b/test/map_tests.c Thu Oct 04 14:08:31 2012 +0200 @@ -111,7 +111,8 @@ int check = 0; int hit = 0; - UCX_MAP_FOREACH(int*, v, map, i) { + int* v; + UCX_MAP_FOREACH(v, i) { check += *v; hit++; } diff -r 583718dd4cf3 -r 7f90a03e186e ucx/map.h --- a/ucx/map.h Thu Oct 04 11:37:23 2012 +0200 +++ b/ucx/map.h Thu Oct 04 14:08:31 2012 +0200 @@ -7,14 +7,14 @@ #include "ucx.h" #include "string.h" -#include +#include #ifdef __cplusplus extern "C" { #endif -#define UCX_MAP_FOREACH(type,elm,map,iter) \ - for(type elm;ucx_map_iter_next(&iter,(void*)&elm)==0;) +#define UCX_MAP_FOREACH(elm,iter) \ + for(elm;ucx_map_iter_next(&iter,(void*)&elm)==0;) typedef struct UcxMap UcxMap; typedef struct UcxKey UcxKey;