Branch: Tag:

2008-06-29

2008-06-29 15:05:16 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed some bugs introduced by the destructive merge_mappings() et al operations.

Rev: src/mapping.c:1.211

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.210 2008/06/29 08:58:30 grubba Exp $ + || $Id: mapping.c,v 1.211 2008/06/29 15:05:16 grubba Exp $   */      #include "global.h"
1540:    res = destructive_copy_mapping(b);    SET_ONERROR(err, do_free_mapping, res);    +  if (!b_md->hashsize) { +  Pike_fatal("Invalid hashsize.\n"); +  } +     /* Add elements in a that aren't in b. */    NEW_MAPPING_LOOP(a_md) {    size_t h = k->hval % b_md->hashsize;
1551:    }    if (!k2) {    mapping_insert(res, &k->ind, &k->val); +  b_md = b->data;    }    }    UNSET_ONERROR(err);
1610:    } else {    map_delete(res, &k2->ind);    } +  b_md = b->data;    }    UNSET_ONERROR(err);    return res;