Thu, 04 Oct 2012 16:03:18 +0200
(broken-commit) - added load and store functions, tests failing
some evil crash happens when executing the test - remove the strcmp calls in the test case for the store and load function and everything "works"
the error must be somewhere else - maybe something that should not be freed is freed during the test
olaf@5 | 1 | /* |
olaf@5 | 2 | * File: ucx.h |
olaf@5 | 3 | * Author: olaf |
olaf@5 | 4 | * |
olaf@5 | 5 | * Created on 31. Dezember 2011, 17:17 |
olaf@5 | 6 | */ |
olaf@5 | 7 | |
olaf@5 | 8 | #ifndef UCX_H |
olaf@5 | 9 | #define UCX_H |
olaf@5 | 10 | |
olaf@5 | 11 | #include <stdlib.h> |
olaf@5 | 12 | |
olaf@5 | 13 | #ifdef __cplusplus |
olaf@5 | 14 | extern "C" { |
olaf@5 | 15 | #endif |
olaf@5 | 16 | |
universe@26 | 17 | #define UCX_FOREACH(type,list,elem) \ |
universe@26 | 18 | for (type elem = list ; elem != NULL ; elem = elem->next) |
universe@26 | 19 | |
universe@18 | 20 | /* element1,element2,custom data -> {-1,0,1} */ |
universe@18 | 21 | typedef int(*cmp_func)(void*,void*,void*); |
universe@18 | 22 | |
universe@18 | 23 | /* element,custom data -> copy of element */ |
universe@18 | 24 | typedef void*(*copy_func)(void*,void*); |
universe@18 | 25 | |
olaf@5 | 26 | #ifdef __cplusplus |
olaf@5 | 27 | } |
olaf@5 | 28 | #endif |
olaf@5 | 29 | |
olaf@5 | 30 | #endif /* UCX_H */ |
olaf@5 | 31 |