Branch: Tag:

2008-06-23

2008-06-23 20:56:52 by Martin Stjernholm <mast@lysator.liu.se>

Cpp directives doesn't always work in macro arguments.

Rev: src/builtin_functions.c:1.674

2:   || 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"
9131:       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);