Branch: Tag:

2006-01-12

2006-01-12 10:52:16 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed erroneous "Freeing shared string again!" when running with -d3 or higher.

Rev: src/stralloc.c:1.203

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.202 2005/11/05 15:28:00 grubba Exp $ + || $Id: stralloc.c,v 1.203 2006/01/12 10:52:16 grubba Exp $   */      #include "global.h"
622:    t->str[len]=0;    t->len=len;    t->size_shift=0; +  DO_IF_DEBUG(t->next = NULL);    return t;   }   
736:    t->refs = 1;    t->len=len;    t->size_shift=shift; +  DO_IF_DEBUG(t->next = NULL);    low_set_index(t,len,0);    return t;   }
829:    return low_end_shared_string(s);   }    + PMOD_EXPORT struct pike_string *defer_end_string(struct pike_string *s) + { + #ifdef STRING_DEFER_THRESHOLD +  if (s->len > STRING_DEFER_THRESHOLD) { +  return s; +  } + #endif +  return end_shared_string(s); + } +    PMOD_EXPORT struct pike_string *end_and_resize_shared_string(struct pike_string *str, ptrdiff_t len)   {    struct pike_string *tmp;