Branch: Tag:

2003-09-05

2003-09-05 15:50:22 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Bugfix in search().

Rev: src/builtin_functions.c:1.508

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_functions.c,v 1.507 2003/09/05 12:36:22 jhs Exp $ + || $Id: builtin_functions.c,v 1.508 2003/09/05 15:50:22 grubba Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.507 2003/09/05 12:36:22 jhs Exp $"); + RCSID("$Id: builtin_functions.c,v 1.508 2003/09/05 15:50:22 grubba Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
823:       /* First try lfun::_search(). */    if (id >= 0) { -  apply_lfun(o, id, args-1); +  apply_low(o, id, args-1);    stack_pop_n_elems_keep_top(1);    return;    }
843:    /* At this point we have two values on the stack. */       while(1) { -  apply_lfun(o, id, 0); +  apply_low(o, id, 0);    if (is_eq(Pike_sp-2, Pike_sp-1)) {    /* Found. */ -  apply_lfun(o, ind, 0); +  apply_low(o, ind, 0);    stack_pop_n_elems_keep_top(3);    return;    } -  apply_lfun(o, next, 0); +  apply_low(o, next, 0);    if (UNSAFE_IS_ZERO(Pike_sp-1)) {    /* Not found. */    pop_n_elems(4);