Branch: Tag:

2008-05-30

2008-05-30 15:19:03 by Martin Stjernholm <mast@lysator.liu.se>

Make use of the new svalue init macros and global constant svalues for 0 and 1.

Rev: src/array.c:1.209
Rev: src/bignum.c:1.45
Rev: src/builtin_functions.c:1.669
Rev: src/code/ia32.c:1.48
Rev: src/encode.c:1.275
Rev: src/error.c:1.163
Rev: src/multiset.c:1.113
Rev: src/multiset.h:1.46
Rev: src/svalue.c:1.242

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.274 2008/05/28 16:59:43 grubba Exp $ + || $Id: encode.c,v 1.275 2008/05/30 15:19:02 mast Exp $   */      #include "global.h"
498:   #endif      { -  static struct svalue dested = { -  T_INT, NUMBER_DESTRUCTED, - #ifdef HAVE_UNION_INIT -  {0}, /* Only to avoid warnings. */ - #endif -  }; +  static struct svalue dested = SVALUE_INIT (T_INT, NUMBER_DESTRUCTED, 0);    INT32 i;    struct svalue *tmp;    struct svalue entry_id;
4900:   #endif    ) {    struct svalue *res; -  struct svalue val = { -  T_INT, NUMBER_NUMBER, - #ifdef HAVE_UNION_INIT -  {0}, /* Only to avoid warnings. */ - #endif /* HAVE_UNION_INIT */ -  }; +  struct svalue val = SVALUE_INIT_INT (0);    val.u.integer = COUNTER_START;    if ((res = low_mapping_lookup(data->decoded, &val))) {    push_svalue(res);