pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: stralloc.c,v 1.161 2008/11/05 15:04:05 grubba Exp $ + || $Id: stralloc.c,v 1.162 2009/05/29 10:34:08 grubba Exp $   */      #include "global.h"   #include "stralloc.h"   #include "pike_macros.h"   #include "dynamic_buffer.h"   #include "pike_macros.h"   #include "pike_memory.h"   #include "pike_error.h"   #include "gc.h"
pike.git/src/stralloc.c:17:   #include "bignum.h"   #include "interpret.h"   #include "block_alloc.h"   #include "operators.h"      #include <errno.h>   #include <float.h>   #include <ctype.h>   #include <math.h>    - RCSID("$Id: stralloc.c,v 1.161 2008/11/05 15:04:05 grubba Exp $"); + RCSID("$Id: stralloc.c,v 1.162 2009/05/29 10:34:08 grubba Exp $");      /* #define STRALLOC_USE_PRIMES */      #ifdef STRALLOC_USE_PRIMES      #define SET_HSIZE(X) htable_size=hashprimes[(X)]   #define HMODULO(X) ((X) % htable_size)      #else   
pike.git/src/stralloc.c:1564:    /* Doesn't change hash value - sneak it in there */    low_set_index(a,index,c);    unlink_pike_string(a);    old = internal_findstring(a->str, a->len, a->size_shift, a->hval);    if (old) {    /* The new string is equal to some old string. */    really_free_pike_string(a);    add_ref(a = old);    } else {    link_pike_string(a, a->hval); +  add_ref(a);    }    return a;    }else{    unlink_pike_string(a);    low_set_index(a,index,c);    return end_shared_string(a);    }    }else{    struct pike_string *r;    r=begin_wide_shared_string(a->len,a->size_shift);