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.673 2008/06/18 21:51:41 grubba Exp $ + || $Id: builtin_functions.c,v 1.674 2008/06/23 20:56:52 mast 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:9124:    ADD_EFUN("hash",f_hash,tFunc(tStr tOr(tInt,tVoid),tInt),OPT_TRY_OPTIMIZE);       ADD_EFUN("hash_7_0",f_hash_7_0,    tFunc(tStr tOr(tInt,tVoid),tInt),OPT_TRY_OPTIMIZE);       ADD_EFUN("hash_7_4",f_hash_7_4,    tFunc(tStr tOr(tInt,tVoid),tInt),OPT_TRY_OPTIMIZE);       ADD_EFUN("hash_value",f_hash_value,tFunc(tMix,tInt),OPT_TRY_OPTIMIZE);    -  ADD_EFUN2("indices",f_indices, +    #if 0 -  +  ADD_EFUN2("indices",f_indices,    tIfnot(tFuncV(tNone,tNot(tOr6(tArray, tMap(tMix, tMix), tSet(tMix),    tStr, tObj, tPrg(tObj))),    tNot(tArr(tMix))), - #endif /* 0 */ +     tOr3(tFunc(tArray,tArr(tIntPos)),    tFunc(tOr3(tMap(tSetvar(1,tMix),tMix),    tSet(tSetvar(1,tMix)),    tNStr(tSetvar(1,tInt))),    tArr(tVar(1))),    tFunc(tOr(tObj,tPrg(tObj)),tArr(tStr))) - #if 0 -  ) - #endif /* 0 */ -  , +  ),    OPT_TRY_OPTIMIZE,fix_indices_type,0); -  + #else +  ADD_EFUN2("indices",f_indices, +  tOr3(tFunc(tArray,tArr(tIntPos)), +  tFunc(tOr3(tMap(tSetvar(1,tMix),tMix), +  tSet(tSetvar(1,tMix)), +  tNStr(tSetvar(1,tInt))), +  tArr(tVar(1))), +  tFunc(tOr(tObj,tPrg(tObj)),tArr(tStr))), +  OPT_TRY_OPTIMIZE,fix_indices_type,0); + #endif       ADD_EFUN("undefinedp", f_undefinedp, tFunc(tMix,tInt01), OPT_TRY_OPTIMIZE);    ADD_EFUN("destructedp", f_destructedp, tFunc(tMix,tInt01), OPT_TRY_OPTIMIZE);      /* function(mixed:int) */    ADD_EFUN("intp", f_intp,tFunc(tMix,tInt),OPT_TRY_OPTIMIZE);      /* function(mixed:int) */    ADD_EFUN("multisetp", f_multisetp,tFunc(tMix,tInt),OPT_TRY_OPTIMIZE);