pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:19:      #include <errno.h>   #include <float.h>   #include <ctype.h>   #include <math.h>      #ifndef HUGE   #define HUGE HUGE_VAL   #endif /*!HUGE*/    - RCSID("$Id: stralloc.c,v 1.126 2001/06/05 10:12:56 hubbe Exp $"); + RCSID("$Id: stralloc.c,v 1.127 2001/06/29 16:49:30 grubba Exp $");      #if PIKE_RUN_UNLOCKED   /* Make this bigger when we get lightweight threads */   #define BUCKET_LOCKS 2048   static PIKE_MUTEX_T *bucket_locks;      #define BUCKETLOCK(HVAL) \    (bucket_locks + ((hval__ % htable_size) & (BUCKET_LOCKS-1)))      #define LOCK_BUCKET(HVAL) do { \
pike.git/src/stralloc.c:1887:    struct pike_string *p;    for(p=base_table[e];p;p=p->next) gc_is_referenced(p);    }   }      PMOD_EXPORT void init_string_builder(struct string_builder *s, int mag)   {    s->malloced=256;    s->s=begin_wide_shared_string(256,mag);    s->s->len=0; +  s->s->str[0] = 0;    s->known_shift=0;   }      PMOD_EXPORT void init_string_builder_alloc(struct string_builder *s, ptrdiff_t length, int mag)   {    s->malloced=length;    s->s=begin_wide_shared_string(length,mag);    s->s->len=0; -  +  s->s->str[0] = 0;    s->known_shift=0;   }      static void string_build_mkspace(struct string_builder *s,    ptrdiff_t chars, int mag)   {    if(mag > s->s->size_shift)    {    struct pike_string *n;    ptrdiff_t l = s->s->len + chars + s->malloced;