# HG changeset patch # User Olaf Wintermann # Date 1374311606 -7200 # Node ID 8170f658f01709d9dec347c06163ca2e8e7039a6 # Parent baa839a7633fb8805e96230e6bd80597f19e85da some fixes diff -r baa839a7633f -r 8170f658f017 ucx/allocator.h --- a/ucx/allocator.h Fri Jul 19 14:17:12 2013 +0200 +++ b/ucx/allocator.h Sat Jul 20 11:13:26 2013 +0200 @@ -150,7 +150,6 @@ * A wrapper for the standard libc free() function. * @param ignore ignored (may be used by allocators for pooled memory) * @param data argument passed to free() - * @return return value of free() */ void ucx_default_free(void *ignore, void *data); diff -r baa839a7633f -r 8170f658f017 ucx/buffer.h --- a/ucx/buffer.h Fri Jul 19 14:17:12 2013 +0200 +++ b/ucx/buffer.h Sat Jul 20 11:13:26 2013 +0200 @@ -26,8 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef BUFFER_H -#define BUFFER_H +#ifndef UCX_BUFFER_H +#define UCX_BUFFER_H #include "ucx.h" #include @@ -130,5 +130,5 @@ } #endif -#endif /* BUFFER_H */ +#endif /* UCX_BUFFER_H */ diff -r baa839a7633f -r 8170f658f017 ucx/dlist.h --- a/ucx/dlist.h Fri Jul 19 14:17:12 2013 +0200 +++ b/ucx/dlist.h Sat Jul 20 11:13:26 2013 +0200 @@ -26,8 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DLIST_H -#define DLIST_H +#ifndef UCX_DLIST_H +#define UCX_DLIST_H #include "ucx.h" #include @@ -66,5 +66,5 @@ } #endif -#endif /* DLIST_H */ +#endif /* UCX_DLIST_H */ diff -r baa839a7633f -r 8170f658f017 ucx/list.h --- a/ucx/list.h Fri Jul 19 14:17:12 2013 +0200 +++ b/ucx/list.h Sat Jul 20 11:13:26 2013 +0200 @@ -26,8 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef LIST_H -#define LIST_H +#ifndef UCX_LIST_H +#define UCX_LIST_H #include "ucx.h" #include @@ -64,5 +64,5 @@ } #endif -#endif /* LIST_H */ +#endif /* UCX_LIST_H */ diff -r baa839a7633f -r 8170f658f017 ucx/logging.h --- a/ucx/logging.h Fri Jul 19 14:17:12 2013 +0200 +++ b/ucx/logging.h Sat Jul 20 11:13:26 2013 +0200 @@ -26,8 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef LOGGING_H -#define LOGGING_H +#ifndef UCX_LOGGING_H +#define UCX_LOGGING_H #include "ucx.h" #include "map.h" @@ -77,4 +77,4 @@ } #endif -#endif /* LOGGING_H */ +#endif /* UCX_LOGGING_H */ diff -r baa839a7633f -r 8170f658f017 ucx/map.h --- a/ucx/map.h Fri Jul 19 14:17:12 2013 +0200 +++ b/ucx/map.h Sat Jul 20 11:13:26 2013 +0200 @@ -26,8 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef MAP_H -#define MAP_H +#ifndef UCX_MAP_H +#define UCX_MAP_H #include "ucx.h" #include "string.h" @@ -127,5 +127,5 @@ } #endif -#endif /* MAP_H */ +#endif /* UCX_MAP_H */ diff -r baa839a7633f -r 8170f658f017 ucx/mempool.h --- a/ucx/mempool.h Fri Jul 19 14:17:12 2013 +0200 +++ b/ucx/mempool.h Sat Jul 20 11:13:26 2013 +0200 @@ -26,8 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef MPOOL_H -#define MPOOL_H +#ifndef UCX_MEMPOOL_H +#define UCX_MEMPOOL_H #include "ucx.h" #include @@ -66,5 +66,5 @@ } #endif -#endif /* MPOOL_H */ +#endif /* UCX_MEMPOOL_H */ diff -r baa839a7633f -r 8170f658f017 ucx/properties.h --- a/ucx/properties.h Fri Jul 19 14:17:12 2013 +0200 +++ b/ucx/properties.h Sat Jul 20 11:13:26 2013 +0200 @@ -26,8 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef PROPERTIES_H -#define PROPERTIES_H +#ifndef UCX_PROPERTIES_H +#define UCX_PROPERTIES_H #include "ucx.h" #include "map.h" @@ -64,5 +64,5 @@ } #endif -#endif /* PROPERTIES_H */ +#endif /* UCX_PROPERTIES_H */ diff -r baa839a7633f -r 8170f658f017 ucx/string.c --- a/ucx/string.c Fri Jul 19 14:17:12 2013 +0200 +++ b/ucx/string.c Sat Jul 20 11:13:26 2013 +0200 @@ -165,13 +165,13 @@ } if ((*n) == nmax) break; } - result = (sstr_t*) allocator->malloc(sizeof(sstr_t) * (*n)); + result = (sstr_t*) allocator->malloc(allocator->pool, sizeof(sstr_t)*(*n)); if (result) { char *pptr = sv.ptr; for (size_t i = 0 ; i < *n ; i++) { size_t l = strlen(pptr); - char* ptr = (char*) allocator->malloc(l + 1); + char* ptr = (char*) allocator->malloc(allocator->pool, l + 1); memcpy(ptr, pptr, l); ptr[l] = 0; diff -r baa839a7633f -r 8170f658f017 ucx/test.h --- a/ucx/test.h Fri Jul 19 14:17:12 2013 +0200 +++ b/ucx/test.h Sat Jul 20 11:13:26 2013 +0200 @@ -52,8 +52,8 @@ * */ -#ifndef TEST_H -#define TEST_H +#ifndef UCX_TEST_H +#define UCX_TEST_H #include "ucx.h" #include @@ -115,5 +115,5 @@ } #endif -#endif /* TEST_H */ +#endif /* UCX_TEST_H */ diff -r baa839a7633f -r 8170f658f017 ucx/utils.h --- a/ucx/utils.h Fri Jul 19 14:17:12 2013 +0200 +++ b/ucx/utils.h Sat Jul 20 11:13:26 2013 +0200 @@ -26,8 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef COMPARATOR_H -#define COMPARATOR_H +#ifndef UCX_UTILS_H +#define UCX_UTILS_H #ifdef __cplusplus extern "C" { @@ -127,5 +127,5 @@ } #endif -#endif /* COMPARATOR_H */ +#endif /* UCX_UTILS_H */