pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.367 2003/01/29 15:55:25 mast Exp $"); + RCSID("$Id: builtin_functions.c,v 1.368 2003/05/07 12:31:43 mast 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:4441:    {    case T_STRING:    i=does_match(Pike_sp[1-args].u.string,0,glob,0);    pop_n_elems(2);    push_int(i);    break;       case T_ARRAY:    a=Pike_sp[1-args].u.array;    matches=0; +  check_stack (120); +  BEGIN_AGGREGATE_ARRAY (MINIMUM (a->size, 120)) {    for(i=0;i<a->size;i++)    {    if(ITEM(a)[i].type != T_STRING)    SIMPLE_BAD_ARG_ERROR("glob", 2, "string|array(string)");       if(does_match(ITEM(a)[i].u.string,0,glob,0))    {    add_ref(ITEM(a)[i].u.string);    push_string(ITEM(a)[i].u.string);    matches++; -  +  DO_AGGREGATE_ARRAY (120);    }    } -  f_aggregate(matches); +  } END_AGGREGATE_ARRAY;    tmp=Pike_sp[-1]; -  +  tmp.u.array->type_field = BIT_STRING;    Pike_sp--;    dmalloc_touch_svalue(Pike_sp);    pop_n_elems(2);    Pike_sp[0]=tmp;    Pike_sp++;    break;       default: -  SIMPLE_BAD_ARG_ERROR("glob", 1, "string|array(string)"); +  SIMPLE_BAD_ARG_ERROR("glob", 2, "string|array(string)");    }   }      /* comb_merge */      /*! @module Array    */      /*! @decl array(int) interleave_array(array(mapping(int:mixed)) tab)    *!