Branch: Tag:

2008-06-19

2008-06-19 14:23:47 by Martin Stjernholm <mast@lysator.liu.se>

Changed some array pointers to PIKEVARs. Either that or you _have_ to
implement GC_CHECK and GC_RECURSE.

Rev: src/builtin.cmod:1.208

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: builtin.cmod,v 1.207 2008/06/18 20:50:59 mast Exp $ + || $Id: builtin.cmod,v 1.208 2008/06/19 14:23:47 mast Exp $   */      #include "global.h"
2188:   {    CVAR struct replace_many_context ctx;    /* NOTE: from and to are only kept for _encode()'s use. */ -  CVAR struct array *from; -  CVAR struct array *to; +  PIKEVAR array from flags ID_STATIC; +  PIKEVAR array to flags ID_STATIC;       /*! @decl void create(array(string)|mapping(string:string)|void from, @    *! array(string)|string|void to)
2205:    free_array(THIS->to);    THIS->to = NULL;    } -  if (THIS->ctx.v) { +  if (THIS->ctx.v)    free_replace_many_context(&THIS->ctx); -  THIS->ctx.v = NULL; -  } +        if (!args) {    push_int(0);
2322:    INIT    {    MEMSET(&THIS->ctx, 0, sizeof(struct replace_many_context)); -  THIS->from = NULL; -  THIS->to = NULL; +     }       EXIT    gc_trivial;    { -  if (THIS->from) free_array(THIS->from); -  if (THIS->to) free_array(THIS->to); +     free_replace_many_context(&THIS->ctx);    }   }