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.552 2004/12/22 12:48:56 grubba Exp $ + || $Id: builtin_functions.c,v 1.553 2005/02/10 01:37:31 nilsson Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.552 2004/12/22 12:48:56 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.553 2005/02/10 01:37:31 nilsson 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:7263:    push_svalue(a->item+i);    add_ref_svalue(mysp-1);    push_array_items(mysp[-1].u.array);    (* fun)(1+splice);    if(Pike_sp>spbase)    {    stack_pop_to_no_free (ITEM(d) + i);    types |= 1 << ITEM(d)[i].type;    pop_n_elems(Pike_sp-spbase);    } +  else +  types |= BIT_INT;    }    }else{    for (i=0; i<n; i++)    {    push_svalue(ITEM(a)+i);    (* fun)(1);    if(Pike_sp>spbase)    {    stack_pop_to_no_free (ITEM(d) + i);    types |= 1 << ITEM(d)[i].type;    pop_n_elems(Pike_sp-spbase);    } -  +  else +  types |= BIT_INT;    }    }    }else{    for (i=0; i<n; i++)    {    push_svalue(ITEM(a)+i);    if (splice)    {    add_ref_svalue(mysp-1);    push_array_items(mysp[-1].u.array);
pike.git/src/builtin_functions.c:7318:    /* ret[i]=arr[i][fun](@extra); */    push_array(d=allocate_array(n));    types = 0;    for (i=0; i<n; i++)    {    push_svalue(ITEM(a)+i);    push_svalue(mysp-2);    f_arrow(2);    if(UNSAFE_IS_ZERO(Pike_sp-1))    { +  types |= BIT_INT;    pop_stack();    continue;    }    add_ref_svalue(mysp-1);    push_array_items(mysp[-1].u.array);    f_call_function(splice+1);    stack_pop_to_no_free (ITEM(d) + i);    types |= 1 << ITEM(d)[i].type;    }    d->type_field = types;
pike.git/src/builtin_functions.c:7347:    Pike_sp--;    dmalloc_touch_svalue(Pike_sp);    push_array_items(Pike_sp->u.array);    f_call_function(1+splice);    return;    }    /* no break here */    default:    SIMPLE_BAD_ARG_ERROR("map",2,    "function|program|object|" -  "string|int(0)|multiset"); +  "string|int(0..0)|multiset");    }   }      /*! @decl mixed filter(mixed arr, void|mixed fun, mixed ...extra)    *!    *! Filters the elements in @[arr] through @[fun].    *!    *! @[arr] is treated as a set of elements to be filtered, as    *! follows:    *!