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.223 2008/06/23 19:22:52 mast Exp $ + || $Id: stralloc.c,v 1.224 2008/06/29 17:56:06 nilsson 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:1085: Inside #if defined(PIKE_DEBUG)
   if(((ptrdiff_t)s->next) & 1)    Pike_fatal("Freeing shared string again, memory corrupt or other bug!\n");    }    if ((s->size_shift < 0) || (s->size_shift > 2)) {    Pike_fatal("Freeing string with bad shift (0x%08x); could it be a type?\n",    s->size_shift);    }   #endif    if (!(s->flags & STRING_NOT_SHARED))    unlink_pike_string(s); +  if (s->flags & STRING_CLEAR_ON_EXIT) +  MEMSET(s->str, 0, s->len);    free_unlinked_pike_string(s);    GC_FREE_SIMPLE_BLOCK(s);   }      PMOD_EXPORT void do_really_free_string(struct pike_string *s)   {    if (s)    really_free_string(s);   }