# HG changeset patch # User Mike Becker # Date 1350036540 -7200 # Node ID bb3eae81aae890f302282faaecea8c3b0bd2f7d3 # Parent 303dabadff1c03aac1868d0e760fb3e6d7178fd8# Parent 6721482eaf8e8d35b1cd46f0a21285bfaa520d5a Merge with 6721482eaf8e8d35b1cd46f0a21285bfaa520d5a diff -r 303dabadff1c -r bb3eae81aae8 ucx/map.c --- a/ucx/map.c Fri Oct 12 12:08:34 2012 +0200 +++ b/ucx/map.c Fri Oct 12 12:09:00 2012 +0200 @@ -28,7 +28,7 @@ return map; } -void ucx_map_free(UcxMap *map) { +void ucx_map_free_elmlist(UcxMap *map) { for (size_t n = 0 ; n < map->size ; n++) { UcxMapElement *elem = map->map[n]; if (elem != NULL) { @@ -41,6 +41,10 @@ } } free(map->map); +} + +void ucx_map_free(UcxMap *map) { + ucx_map_free_elmlist(map); free(map); } @@ -83,7 +87,9 @@ } map->count = 0; ucx_map_copy(&oldmap, map, NULL, NULL); - /* TODO: free the UcxMapElement list of oldmap */ + + /* free the UcxMapElement list of oldmap */ + ucx_map_free_elmlist(&oldmap); } return 0; } diff -r 303dabadff1c -r bb3eae81aae8 ucx/test.h --- a/ucx/test.h Fri Oct 12 12:08:34 2012 +0200 +++ b/ucx/test.h Fri Oct 12 12:09:00 2012 +0200 @@ -61,7 +61,7 @@ void ucx_test_register(UcxTestSuite*, UcxTest); void ucx_test_run(UcxTestSuite*, FILE*); -#define UCX_TEST_DECLARE(name) void name(UcxTestSuite*,FILE *); +#define UCX_TEST_DECLARE(name) void name(UcxTestSuite*,FILE *) #define UCX_TEST_IMPLEMENT(name) void name(UcxTestSuite* _suite_,FILE *_output_) #define UCX_TEST_BEGIN fwrite("Running ", 1, 8, _output_);\