Branch: Tag:

1999-12-05

1999-12-05 15:37:30 by Martin Stjernholm <mast@lysator.liu.se>

Fixed proper type inference for search().

Rev: src/builtin_functions.c:1.213

5:   \*/   /**/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.212 1999/11/26 03:26:13 mast Exp $"); + RCSID("$Id: builtin_functions.c,v 1.213 1999/12/05 15:37:30 mast Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
5305:   /* function(:int *) */    ADD_EFUN("rusage", f_rusage,tFunc(tNone,tArr(tInt)),OPT_EXTERNAL_DEPEND);    - /* function(string,string,void|int:int)|function(array,mixed,void|int:int)|function(mapping,mixed,void|mixed:mixed) */ -  ADD_EFUN("search",f_search,tOr3(tFunc(tStr tStr tOr(tVoid,tInt),tInt),tFunc(tArray tMix tOr(tVoid,tInt),tInt),tFunc(tMapping tMix tOr(tVoid,tMix),tMix)),0); +  ADD_EFUN("search",f_search, +  tOr3(tFunc(tStr tStr tOr(tVoid,tInt), +  tInt), +  tFunc(tArr(tSetvar(0,tMix)) tVar(0) tOr(tVoid,tInt), +  tInt), +  tFunc(tMap(tSetvar(1,tMix),tSetvar(2,tMix)) tVar(2) tOr(tVoid,tVar(1)), +  tVar(1))), +  0);      /* function(float|int,int|void:void) */    ADD_EFUN("sleep", f_sleep,tFunc(tOr(tFlt,tInt) tOr(tInt,tVoid),tVoid),OPT_SIDE_EFFECT);