Branch: Tag:

2000-08-24

2000-08-24 19:06:21 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.258

5:   \*/   /**/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.257 2000/08/02 21:55:25 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.258 2000/08/24 19:06:21 mast Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
4830:    sp--; /* allocate_multiset is destructive */    dmalloc_touch_svalue(sp);    push_multiset(allocate_multiset(sp->u.array)); +  order_multiset(sp[-1].u.multiset);    return;       case T_STRING:
5166:    sp--; /* allocate_multiset is destructive */    dmalloc_touch_svalue(sp);    push_multiset(allocate_multiset(sp->u.array)); +  order_multiset(sp[-1].u.multiset);    return;       case T_STRING:
6125:    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);