Branch: Tag:

2006-03-11

2006-03-11 17:46:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Minor optimization.

Rev: src/builtin.cmod:1.181

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.180 2006/03/11 17:20:47 grubba Exp $ + || $Id: builtin.cmod,v 1.181 2006/03/11 17:46:21 grubba Exp $   */      #include "global.h"
1939:   PIKECLASS multi_string_replace   {    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;   
2022:    PIKEFUN string `()(string str)    {    if (!THIS->ctx.v) { -  add_ref(str); -  RETURN str; +  /* The result is already on the stack in the correct place... */ +  return;    }       RETURN execute_replace_many(&THIS->ctx, str);