Branch: Tag:

2008-06-16

2008-06-16 21:46:35 by Martin Stjernholm <mast@lysator.liu.se>

Changed do_really_free_pike_string to a much more descriptive name. Viva ABI
incompatibility! ;)

Rev: src/builtin_functions.c:1.671
Rev: src/modules/files/file.c:1.391
Rev: src/stralloc.c:1.220
Rev: src/stralloc.h:1.106

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.219 2008/05/11 14:55:54 mast Exp $ + || $Id: stralloc.c,v 1.220 2008/06/16 21:46:34 mast Exp $   */      #include "global.h"
602:    } \    } while(0)    - #define really_free_pike_string(s) do { \ + #define free_unlinked_pike_string(s) do { \    if (s->len <= SHORT_STRING_THRESHOLD) { \    really_free_short_pike_string(s); \    } else { \
1036:    free_string(s);   }    - PMOD_EXPORT void do_really_free_string(struct pike_string *s) + PMOD_EXPORT void do_free_unlinked_pike_string(struct pike_string *s)   {    if (s) -  really_free_string(s); +  free_unlinked_pike_string(s);   }    - PMOD_EXPORT void do_really_free_pike_string(struct pike_string *s) - { -  if (s) -  really_free_pike_string(s); - } -  +    PMOD_EXPORT void really_free_string(struct pike_string *s)   {   #ifdef PIKE_DEBUG
1073:   #endif    if (!(s->flags & STRING_NOT_SHARED))    unlink_pike_string(s); -  really_free_pike_string(s); +  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); + } +    PMOD_EXPORT void debug_free_string(struct pike_string *s)   {    if(!sub_ref(s))
2074:    {    next=s->next;   #ifdef REALLY_FREE -  really_free_pike_string(s); +  free_unlinked_pike_string(s);   #else    s->next=0;   #endif