Branch: Tag:

2008-01-28

2008-01-28 00:49:36 by Martin Stjernholm <mast@lysator.liu.se>

Fixed in a better way.

Rev: src/mapping.c:1.197

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: mapping.c,v 1.196 2008/01/27 14:41:10 grubba Exp $ + || $Id: mapping.c,v 1.197 2008/01/28 00:49:36 mast Exp $   */      #include "global.h"
748:    * possible to tell the difference. */    assign_svalue (&k->ind, key);    assign_svalue(& k->val, val); +  if (val->type == T_INT) k->val.subtype = NUMBER_NUMBER;   #ifdef PIKE_DEBUG    if(d_flag>1) check_mapping(m);   #endif
789:    md->val_types |= 1 << val->type;    assign_svalue_no_free(& k->ind, key);    assign_svalue_no_free(& k->val, val); +  if (val->type == T_INT) k->val.subtype = NUMBER_NUMBER;    k->hval = h2;    md->size++;   #ifdef MAPPING_SIZE_DEBUG
981:    *prev=k->next;    free_svalue(& k->ind);    if(to) -  to[0]=k->val; +  move_svalue (to, &k->val);    else    free_svalue(& k->val);   
1214:       if(!IS_DESTRUCTED (key) && (p=low_mapping_lookup(m,key)))    { + #if 0    /* Never return NUMBER_UNDEFINED for existing entries. */ -  +  /* No, but UNDEFINED values are reasonably not stored in the first +  * place. (Or it's at least more efficient to take care of that +  * when they're stored.) /mast */    if(p->type==T_INT)    p->subtype=NUMBER_NUMBER; -  + #endif       assign_svalue_no_free(dest, p);    }else{