pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1:   /* -*- c -*-   || 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: builtin.cmod,v 1.208 2008/06/19 14:23:47 mast Exp $ + || $Id: builtin.cmod,v 1.209 2008/06/23 16:03:23 mast Exp $   */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"
pike.git/src/builtin.cmod:2341:    *! and the replace rule in the Replace object will be applied. The    *! Replace object is used internally by the Pike optimizer and need    *! not be used manually.    */   PIKECLASS single_string_replace   {    CVAR SearchMojt mojt;    CVAR struct pike_string *del;    CVAR struct pike_string *to;    +  EXTRA +  { +  MAP_VARIABLE ("o", tObj, ID_STATIC|ID_PRIVATE, +  single_string_replace_storage_offset + +  OFFSETOF (single_string_replace_struct, mojt.container), +  T_OBJECT); +  } +     INIT    { -  THIS->mojt.vtab = NULL; -  THIS->mojt.data = NULL; +     THIS->del = NULL;    THIS->to = NULL;    }       EXIT    gc_trivial;    { -  if (THIS->mojt.vtab) { -  THIS->mojt.vtab->freeme(THIS->mojt.data); -  THIS->mojt.vtab = NULL; -  THIS->mojt.data = NULL; -  } +     if (THIS->del) {    free_string(THIS->del);    THIS->del = NULL;    }    if (THIS->to) {    free_string(THIS->to);    THIS->to = NULL;    }    }