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.504 2003/09/04 15:03:11 grubba Exp $ + || $Id: builtin_functions.c,v 1.505 2003/09/04 16:00:29 grubba Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.504 2003/09/04 15:03:11 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.505 2003/09/04 16:00:29 grubba Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"   #include "constants.h"   #include "mapping.h"   #include "stralloc.h"
pike.git/src/builtin_functions.c:768:    } else {    mapping_search_no_free(Pike_sp,Pike_sp[-args].u.mapping,Pike_sp+1-args,0);    }    free_svalue(Pike_sp-args);    Pike_sp[-args]=*Pike_sp;    dmalloc_touch_svalue(Pike_sp);    pop_n_elems(args-1);    return;       case T_OBJECT: -  if (Pike_sp[-args].u.object->program) { +  if (Pike_sp[-args].u.object->prog) {    struct object *o = Pike_sp[-args].u.object; -  struct program *p = o->program; +  struct program *p = o->prog;    /* NOTE: Fake lfun! */ -  int id = low_find_lfun(p, LFUN__STATIC); +  int id = low_find_lfun(p, LFUN__SEARCH);    int next, ind;       /* First try lfun::_search(). */    if (id >= 0) {    apply_lfun(o, id, args-1);    stack_pop_n_elems_keep_top(1);    return;    }       /* Check if we have an iterator. */ -  if (((id = find_identifier(p, "value")) >= 0) && -  ((next = find_identifier(p, "next")) >= 0) && -  ((ind = find_identifier(p, "index")) >= 0)) { +  if (((id = find_identifier("value", p)) >= 0) && +  ((next = find_identifier("next", p)) >= 0) && +  ((ind = find_identifier("index", p)) >= 0)) {    /* We have an iterator. */       /* Set the start position if needed. */    if (args > 2) {    apply(o, "set_index", args-2);    pop_stack();    }       /* At this point we have two values on the stack. */