pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.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: builtin_functions.c,v 1.567 2004/09/18 20:50:48 nilsson Exp $ + || $Id: builtin_functions.c,v 1.568 2004/10/11 16:50:02 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_functions.c:3295:    node **arg2 = my_get_arg(&_CDR(n), 2);       if (arg1 && pike_types_le((*arg1)->type, array_type_string) &&    arg2 && pike_types_le((*arg2)->type, array_type_string)) {    /* The second and third arguments are arrays. */    if (!is_const(*arg0) && is_const(*arg1) && is_const(*arg2)) {    /* The second and third arguments are constants. */    struct svalue *save_sp = Pike_sp;    JMP_BUF tmp;    if (SETJMP(tmp)) { -  yywarning("Optimizer failure in replace()."); -  pop_n_elems(Pike_sp - save_sp); -  free_svalue(&throw_value); +  struct svalue thrown = throw_value; +  struct pike_string *s;    throw_value.type = T_INT; -  +  pop_n_elems(Pike_sp - save_sp); +  yywarning("Optimizer failure in replace()."); +  s = format_exception_for_error_msg (&thrown); +  if (s) { +  yywarning ("%S", s); +  free_string (s); +  } +  free_svalue(&thrown);    } else {    extern struct program *multi_string_replace_program;    INT16 lfun;    struct object *replace_obj;    node *ret = NULL;    INT32 args = eval_low(*arg1,1); /* NOTE: Addition splitted to ensure */    args += eval_low(*arg2,1); /* correct evaluation order. */       replace_obj = clone_object(multi_string_replace_program, args);