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.697 2010/02/23 13:16:38 grubba Exp $ + || $Id: builtin_functions.c,v 1.698 2010/02/23 14:37:22 grubba 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:1093:    ptrdiff_t i;    struct object *o = Pike_sp[-args].u.object;    int inherit_no = Pike_sp[-args].subtype;    push_int(0);       for (i = 0; i < b->len; i++) {    p_wchar2 ch = index_shared_string(b, i);    Pike_sp[-1].u.integer = i;    /* Note: Integers do not need to be freed. */    object_index_no_free(Pike_sp-1, o, inherit_no, Pike_sp-1); -  if (Pike_sp[-1].type != T_INTEGER) { +  if (Pike_sp[-1].type != PIKE_T_INT) {    Pike_error("Unexepected value returned from index operator.\n");    }    if (ch != Pike_sp[-1].u.integer) {    pop_n_elems(args + 1);    push_int(0);    return;    }    } -  pop_n_elems(arg+1); +  pop_n_elems(args+1);    push_int(1);    return;    }       a = Pike_sp[-args].u.string;       /* First handle some common special cases. */    if ((b->len > a->len) || (b->size_shift > a->size_shift)) {    pop_n_elems(args);    push_int(0);