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.116 2001/06/21 00:23:57 per Exp $"); + RCSID("$Id: stralloc.c,v 1.117 2001/06/29 16:59:09 grubba Exp $");      #define BEGIN_HASH_SIZE 997   #define MAX_AVG_LINK_LENGTH 3      /* Experimental dynamic hash length */   #ifndef HASH_PREFIX   static unsigned int HASH_PREFIX=64;   static unsigned int need_more_hash_prefix=0;   #endif   
pike.git/src/stralloc.c:1760:    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;