pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:18:      #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.101 2000/09/15 00:59:39 mast Exp $"); + RCSID("$Id: stralloc.c,v 1.102 2000/10/08 19:07:35 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:491:    low_set_index(t,len,0);    return t;   }      /*    * This function assumes that the shift size is already the minimum it    * can be.    */   PMOD_EXPORT struct pike_string *low_end_shared_string(struct pike_string *s)   { -  ptrdiff_t len, h; +  ptrdiff_t len; +  size_t h;    struct pike_string *s2;       len = s->len;    h = do_hash(s); -  s2 = internal_findstring(s->str,len,s->size_shift,h); +  s2 = internal_findstring(s->str, len, s->size_shift, h);   #ifdef PIKE_DEBUG    if(s2==s)    fatal("end_shared_string called twice! (or something like that)\n");   #endif       if(s2)    {    free((char *)s); -  s=s2; +  s = s2;    }else{    link_pike_string(s, h);    }    add_ref(s);       return s;      }      /*