Branch: Tag:

2005-01-18

2005-01-18 17:54:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Minor cleanups.

Rev: src/stralloc.c:1.195

2:   || 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.194 2005/01/17 15:21:48 grubba Exp $ + || $Id: stralloc.c,v 1.195 2005/01/18 17:54:49 grubba Exp $   */      #include "global.h"
1621:    {    /* One ref - destructive mode */    +  unlink_pike_string(a); +  low_set_index(a, index, c);    if((((unsigned int)index) >= HASH_PREFIX) && (index < a->len-8))    {    struct pike_string *old;    /* 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. */
1635:    } else {    link_pike_string(a, a->hval);    } -  return a; +     }else{ -  unlink_pike_string(a); -  low_set_index(a,index,c); -  return end_shared_string(a); +  a = end_shared_string(a);    } -  +  return a;    }else{    struct pike_string *r;    r=begin_wide_shared_string(a->len,a->size_shift);