Branch: Tag:

2000-08-24

2000-08-24 19:17:32 by Martin Stjernholm <mast@lysator.liu.se>

Fixed bug in f_map and f_filter where they returned unsorted multisets
when fed multisets as first argument. Fixed prototype for map() when
the second argument is a string.

Rev: src/builtin_functions.c:1.302

5:   \*/   /**/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.301 2000/08/24 17:11:16 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.302 2000/08/24 19:17:32 mast Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
4890:    Pike_sp--; /* allocate_multiset is destructive */    dmalloc_touch_svalue(Pike_sp);    push_multiset(allocate_multiset(Pike_sp->u.array)); +  order_multiset(sp[-1].u.multiset);    return;       case T_STRING:
5263:    Pike_sp--; /* allocate_multiset is destructive */    dmalloc_touch_svalue(Pike_sp);    push_multiset(allocate_multiset(Pike_sp->u.array)); +  order_multiset(sp[-1].u.multiset);    return;       case T_STRING:
6115:    tFuncV(tString tSet(tMix),tMix,tString),    tFuncV(tString tMap(tMix,tInt), tMix, tString) ),    -  tFuncV(tArr(tStringIndicable) tString,tMix,tMix), +  tOr4 (tFuncV(tArr(tStringIndicable) tString,tMix,tArray), +  tFuncV(tMap(tSetvar(3,tMix),tStringIndicable) tString,tMix, +  tMap(tVar(3),tMix)), +  tFuncV(tSet(tStringIndicable) tString,tMix,tSet(tMix)), +  tFuncV(tOr(tProgram,tFunction) tString,tMix,tMapping)),       tFuncV(tObj,tMix,tMix) ),    OPT_TRY_OPTIMIZE, fix_map_node_info, 0);