ucx/string.c

changeset 120
8170f658f017
parent 119
baa839a7633f
child 123
7fb0f74517c5
     1.1 --- a/ucx/string.c	Fri Jul 19 14:17:12 2013 +0200
     1.2 +++ b/ucx/string.c	Sat Jul 20 11:13:26 2013 +0200
     1.3 @@ -165,13 +165,13 @@
     1.4          }
     1.5          if ((*n) == nmax) break;
     1.6      }
     1.7 -    result = (sstr_t*) allocator->malloc(sizeof(sstr_t) * (*n));
     1.8 +    result = (sstr_t*) allocator->malloc(allocator->pool, sizeof(sstr_t)*(*n));
     1.9  
    1.10      if (result) {
    1.11          char *pptr = sv.ptr;
    1.12          for (size_t i = 0 ; i < *n ; i++) {
    1.13              size_t l = strlen(pptr);
    1.14 -            char* ptr = (char*) allocator->malloc(l + 1);
    1.15 +            char* ptr = (char*) allocator->malloc(allocator->pool, l + 1);
    1.16              memcpy(ptr, pptr, l);
    1.17              ptr[l] = 0;
    1.18  

mercurial