some fixes

Sat, 20 Jul 2013 11:13:26 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 20 Jul 2013 11:13:26 +0200
changeset 120
8170f658f017
parent 119
baa839a7633f
child 121
311cac04d079

some fixes

ucx/allocator.h file | annotate | diff | comparison | revisions
ucx/buffer.h file | annotate | diff | comparison | revisions
ucx/dlist.h file | annotate | diff | comparison | revisions
ucx/list.h file | annotate | diff | comparison | revisions
ucx/logging.h file | annotate | diff | comparison | revisions
ucx/map.h file | annotate | diff | comparison | revisions
ucx/mempool.h file | annotate | diff | comparison | revisions
ucx/properties.h file | annotate | diff | comparison | revisions
ucx/string.c file | annotate | diff | comparison | revisions
ucx/test.h file | annotate | diff | comparison | revisions
ucx/utils.h file | annotate | diff | comparison | revisions
--- 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 <code>free()</code> function.
  * @param ignore ignored (may be used by allocators for pooled memory)
  * @param data argument passed to <code>free()</code>
- * @return return value of <code>free()</code>
  */
 void ucx_default_free(void *ignore, void *data);
 
--- 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 <sys/types.h>
@@ -130,5 +130,5 @@
 }
 #endif
 
-#endif	/* BUFFER_H */
+#endif	/* UCX_BUFFER_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 <stddef.h>
@@ -66,5 +66,5 @@
 }
 #endif
 
-#endif	/* DLIST_H */
+#endif	/* UCX_DLIST_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 <stddef.h>
@@ -64,5 +64,5 @@
 }
 #endif
 
-#endif	/* LIST_H */
+#endif	/* UCX_LIST_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 */
--- 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 */
 
--- 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 <stddef.h>
@@ -66,5 +66,5 @@
 }
 #endif
 
-#endif	/* MPOOL_H */
+#endif	/* UCX_MEMPOOL_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 */
 
--- 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;
 
--- 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 <stdio.h>
@@ -115,5 +115,5 @@
 }
 #endif
 
-#endif	/* TEST_H */
+#endif	/* UCX_TEST_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 */
 

mercurial