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
     1.1 --- a/ucx/allocator.h	Fri Jul 19 14:17:12 2013 +0200
     1.2 +++ b/ucx/allocator.h	Sat Jul 20 11:13:26 2013 +0200
     1.3 @@ -150,7 +150,6 @@
     1.4   * A wrapper for the standard libc <code>free()</code> function.
     1.5   * @param ignore ignored (may be used by allocators for pooled memory)
     1.6   * @param data argument passed to <code>free()</code>
     1.7 - * @return return value of <code>free()</code>
     1.8   */
     1.9  void ucx_default_free(void *ignore, void *data);
    1.10  
     2.1 --- a/ucx/buffer.h	Fri Jul 19 14:17:12 2013 +0200
     2.2 +++ b/ucx/buffer.h	Sat Jul 20 11:13:26 2013 +0200
     2.3 @@ -26,8 +26,8 @@
     2.4   * POSSIBILITY OF SUCH DAMAGE.
     2.5   */
     2.6  
     2.7 -#ifndef BUFFER_H
     2.8 -#define	BUFFER_H
     2.9 +#ifndef UCX_BUFFER_H
    2.10 +#define	UCX_BUFFER_H
    2.11  
    2.12  #include "ucx.h"
    2.13  #include <sys/types.h>
    2.14 @@ -130,5 +130,5 @@
    2.15  }
    2.16  #endif
    2.17  
    2.18 -#endif	/* BUFFER_H */
    2.19 +#endif	/* UCX_BUFFER_H */
    2.20  
     3.1 --- a/ucx/dlist.h	Fri Jul 19 14:17:12 2013 +0200
     3.2 +++ b/ucx/dlist.h	Sat Jul 20 11:13:26 2013 +0200
     3.3 @@ -26,8 +26,8 @@
     3.4   * POSSIBILITY OF SUCH DAMAGE.
     3.5   */
     3.6  
     3.7 -#ifndef DLIST_H
     3.8 -#define	DLIST_H
     3.9 +#ifndef UCX_DLIST_H
    3.10 +#define	UCX_DLIST_H
    3.11  
    3.12  #include "ucx.h"
    3.13  #include <stddef.h>
    3.14 @@ -66,5 +66,5 @@
    3.15  }
    3.16  #endif
    3.17  
    3.18 -#endif	/* DLIST_H */
    3.19 +#endif	/* UCX_DLIST_H */
    3.20  
     4.1 --- a/ucx/list.h	Fri Jul 19 14:17:12 2013 +0200
     4.2 +++ b/ucx/list.h	Sat Jul 20 11:13:26 2013 +0200
     4.3 @@ -26,8 +26,8 @@
     4.4   * POSSIBILITY OF SUCH DAMAGE.
     4.5   */
     4.6  
     4.7 -#ifndef LIST_H
     4.8 -#define	LIST_H
     4.9 +#ifndef UCX_LIST_H
    4.10 +#define	UCX_LIST_H
    4.11  
    4.12  #include "ucx.h"
    4.13  #include <stddef.h>
    4.14 @@ -64,5 +64,5 @@
    4.15  }
    4.16  #endif
    4.17  
    4.18 -#endif	/* LIST_H */
    4.19 +#endif	/* UCX_LIST_H */
    4.20  
     5.1 --- a/ucx/logging.h	Fri Jul 19 14:17:12 2013 +0200
     5.2 +++ b/ucx/logging.h	Sat Jul 20 11:13:26 2013 +0200
     5.3 @@ -26,8 +26,8 @@
     5.4   * POSSIBILITY OF SUCH DAMAGE.
     5.5   */
     5.6  
     5.7 -#ifndef LOGGING_H
     5.8 -#define LOGGING_H
     5.9 +#ifndef UCX_LOGGING_H
    5.10 +#define UCX_LOGGING_H
    5.11  
    5.12  #include "ucx.h"
    5.13  #include "map.h"
    5.14 @@ -77,4 +77,4 @@
    5.15  }
    5.16  #endif
    5.17  
    5.18 -#endif /* LOGGING_H */
    5.19 +#endif /* UCX_LOGGING_H */
     6.1 --- a/ucx/map.h	Fri Jul 19 14:17:12 2013 +0200
     6.2 +++ b/ucx/map.h	Sat Jul 20 11:13:26 2013 +0200
     6.3 @@ -26,8 +26,8 @@
     6.4   * POSSIBILITY OF SUCH DAMAGE.
     6.5   */
     6.6  
     6.7 -#ifndef MAP_H
     6.8 -#define	MAP_H
     6.9 +#ifndef UCX_MAP_H
    6.10 +#define	UCX_MAP_H
    6.11  
    6.12  #include "ucx.h"
    6.13  #include "string.h"
    6.14 @@ -127,5 +127,5 @@
    6.15  }
    6.16  #endif
    6.17  
    6.18 -#endif	/* MAP_H */
    6.19 +#endif	/* UCX_MAP_H */
    6.20  
     7.1 --- a/ucx/mempool.h	Fri Jul 19 14:17:12 2013 +0200
     7.2 +++ b/ucx/mempool.h	Sat Jul 20 11:13:26 2013 +0200
     7.3 @@ -26,8 +26,8 @@
     7.4   * POSSIBILITY OF SUCH DAMAGE.
     7.5   */
     7.6  
     7.7 -#ifndef MPOOL_H
     7.8 -#define	MPOOL_H
     7.9 +#ifndef UCX_MEMPOOL_H
    7.10 +#define	UCX_MEMPOOL_H
    7.11  
    7.12  #include "ucx.h"
    7.13  #include <stddef.h>
    7.14 @@ -66,5 +66,5 @@
    7.15  }
    7.16  #endif
    7.17  
    7.18 -#endif	/* MPOOL_H */
    7.19 +#endif	/* UCX_MEMPOOL_H */
    7.20  
     8.1 --- a/ucx/properties.h	Fri Jul 19 14:17:12 2013 +0200
     8.2 +++ b/ucx/properties.h	Sat Jul 20 11:13:26 2013 +0200
     8.3 @@ -26,8 +26,8 @@
     8.4   * POSSIBILITY OF SUCH DAMAGE.
     8.5   */
     8.6  
     8.7 -#ifndef PROPERTIES_H
     8.8 -#define	PROPERTIES_H
     8.9 +#ifndef UCX_PROPERTIES_H
    8.10 +#define	UCX_PROPERTIES_H
    8.11  
    8.12  #include "ucx.h"
    8.13  #include "map.h"
    8.14 @@ -64,5 +64,5 @@
    8.15  }
    8.16  #endif
    8.17  
    8.18 -#endif	/* PROPERTIES_H */
    8.19 +#endif	/* UCX_PROPERTIES_H */
    8.20  
     9.1 --- a/ucx/string.c	Fri Jul 19 14:17:12 2013 +0200
     9.2 +++ b/ucx/string.c	Sat Jul 20 11:13:26 2013 +0200
     9.3 @@ -165,13 +165,13 @@
     9.4          }
     9.5          if ((*n) == nmax) break;
     9.6      }
     9.7 -    result = (sstr_t*) allocator->malloc(sizeof(sstr_t) * (*n));
     9.8 +    result = (sstr_t*) allocator->malloc(allocator->pool, sizeof(sstr_t)*(*n));
     9.9  
    9.10      if (result) {
    9.11          char *pptr = sv.ptr;
    9.12          for (size_t i = 0 ; i < *n ; i++) {
    9.13              size_t l = strlen(pptr);
    9.14 -            char* ptr = (char*) allocator->malloc(l + 1);
    9.15 +            char* ptr = (char*) allocator->malloc(allocator->pool, l + 1);
    9.16              memcpy(ptr, pptr, l);
    9.17              ptr[l] = 0;
    9.18  
    10.1 --- a/ucx/test.h	Fri Jul 19 14:17:12 2013 +0200
    10.2 +++ b/ucx/test.h	Sat Jul 20 11:13:26 2013 +0200
    10.3 @@ -52,8 +52,8 @@
    10.4   *
    10.5   */
    10.6  
    10.7 -#ifndef TEST_H
    10.8 -#define	TEST_H
    10.9 +#ifndef UCX_TEST_H
   10.10 +#define	UCX_TEST_H
   10.11  
   10.12  #include "ucx.h"
   10.13  #include <stdio.h>
   10.14 @@ -115,5 +115,5 @@
   10.15  }
   10.16  #endif
   10.17  
   10.18 -#endif	/* TEST_H */
   10.19 +#endif	/* UCX_TEST_H */
   10.20  
    11.1 --- a/ucx/utils.h	Fri Jul 19 14:17:12 2013 +0200
    11.2 +++ b/ucx/utils.h	Sat Jul 20 11:13:26 2013 +0200
    11.3 @@ -26,8 +26,8 @@
    11.4   * POSSIBILITY OF SUCH DAMAGE.
    11.5   */
    11.6  
    11.7 -#ifndef COMPARATOR_H
    11.8 -#define	COMPARATOR_H
    11.9 +#ifndef UCX_UTILS_H
   11.10 +#define	UCX_UTILS_H
   11.11  
   11.12  #ifdef	__cplusplus
   11.13  extern "C" {
   11.14 @@ -127,5 +127,5 @@
   11.15  }
   11.16  #endif
   11.17  
   11.18 -#endif	/* COMPARATOR_H */
   11.19 +#endif	/* UCX_UTILS_H */
   11.20  

mercurial