Branch: Tag:

2004-03-14

2004-03-14 05:45:44 by Martin Nilsson <mani@lysator.liu.se>

mapping int-svalues must have proper subtypes since check_mappings traverse them all.

Rev: src/encode.c:1.210
Rev: src/program.c:1.559

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: encode.c,v 1.209 2003/12/17 21:08:56 marcus Exp $ + || $Id: encode.c,v 1.210 2004/03/14 05:45:44 nilsson Exp $   */      #include "global.h"
32:   #include "opcodes.h"   #include "peep.h"    - RCSID("$Id: encode.c,v 1.209 2003/12/17 21:08:56 marcus Exp $"); + RCSID("$Id: encode.c,v 1.210 2004/03/14 05:45:44 nilsson Exp $");      /* #define ENCODE_DEBUG */   
1676:    data->encoded=allocate_mapping(128);    data->delayed = allocate_array (0);    data->counter.type=T_INT; +  data->counter.subtype=NUMBER_NUMBER;    data->counter.u.integer=COUNTER_START;      #ifdef ENCODE_DEBUG
2331:    EDB (2, fprintf(stderr, "%*sDecoding delay encoded from <%d>\n",    data->depth, "", num););    entry_id.type = T_INT; -  entry_id.subtype = 0; +  entry_id.subtype = NUMBER_NUMBER;    entry_id.u.integer = num;    if (!(delayed_enc_val = low_mapping_lookup (data->decoded, &entry_id)))    Pike_error ("Failed to find previous record of delay encoded entry <%d>.\n",
2343:    EDB (1, fprintf(stderr, "%*sDecoding TAG_AGAIN from <%d>\n",    data->depth, "", num););    entry_id.type=T_INT; -  entry_id.subtype=0; +  entry_id.subtype=NUMBER_NUMBER;    entry_id.u.integer=num;    if((tmp2=low_mapping_lookup(data->decoded, &entry_id)))    {
4278:       data=ALLOC_STRUCT(decode_data);    data->counter.type=T_INT; +  data->counter.subtype=NUMBER_NUMBER;    data->counter.u.integer=COUNTER_START;    data->data=(unsigned char *)tmp->str;    data->len=tmp->len;