Wed, 06 Feb 2013 14:31:44 +0100
fixed macros and ucx_map_store_enc
ucx/map.c | file | annotate | diff | comparison | revisions | |
ucx/map.h | file | annotate | diff | comparison | revisions |
1.1 --- a/ucx/map.c Wed Feb 06 12:55:56 2013 +0100 1.2 +++ b/ucx/map.c Wed Feb 06 14:31:44 2013 +0100 1.3 @@ -364,7 +364,7 @@ 1.4 1.5 UCX_MAP_FOREACH(v, iter) { 1.6 k = (char*) iter.cur->key.data; 1.7 - key = sstr(k); 1.8 + key = sstrn(k, iter.cur->key.len); 1.9 if (encoder) { 1.10 size_t encodedSize; 1.11 void *encoded = encoder(v, encdata, &encodedSize);
2.1 --- a/ucx/map.h Wed Feb 06 12:55:56 2013 +0100 2.2 +++ b/ucx/map.h Wed Feb 06 14:31:44 2013 +0100 2.3 @@ -72,7 +72,7 @@ 2.4 #define ucx_map_cstr_put(m, s, d) \ 2.5 ucx_map_put(m, ucx_key((void*)s, strlen(s)), d) 2.6 #define ucx_map_int_put(m, i, d) \ 2.7 - ucx_map_put(m, ucx_key((void*)&i, sizeof(d)), d) 2.8 + ucx_map_put(m, ucx_key((void*)&i, sizeof(i)), d) 2.9 2.10 #define ucx_map_sstr_get(m, s) \ 2.11 ucx_map_get(m, ucx_key(s.ptr, s.length)) 2.12 @@ -86,7 +86,7 @@ 2.13 #define ucx_map_cstr_remove(m, s) \ 2.14 ucx_map_remove(m, ucx_key((void*)s, strlen(s))) 2.15 #define ucx_map_int_remove(m, i) \ 2.16 - ucx_map_remove(m, ucx_key((void*)&i, sizeof(int))) 2.17 + ucx_map_remove(m, ucx_key((void*)&i, sizeof(i))) 2.18 2.19 UcxKey ucx_key(void *data, size_t len); 2.20