Branch: Tag:

2007-05-02

2007-05-02 17:43:32 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Changed implementation and syntax for the subtypes for strings. push_string_type() is no more.

Rev: lib/modules/Getopt.pmod:1.32
Rev: src/encode.c:1.242
Rev: src/language.yacc:1.374
Rev: src/modules/sprintf/sprintf.c:1.144
Rev: src/pike_types.c:1.305
Rev: src/pike_types.h:1.109
Rev: src/svalue.h:1.145

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.241 2007/04/26 11:13:22 grubba Exp $ + || $Id: encode.c,v 1.242 2007/05/02 17:43:32 grubba Exp $   */      #include "global.h"
282:    addchar(T_FUNCTION);    addchar(T_MANY);    } else if (t->type == T_STRING) { -  if (CAR_TO_INT(t) == 32) { +  if (t->car == int_type_string) {    addchar(T_STRING);    } else {    /* Narrow string */    addchar(PIKE_T_NSTRING); -  addchar(CAR_TO_INT(t)); +  encode_type(t->car, data);    }    return;    } else {
380:    case '8':    case '9':    case T_FLOAT: -  case T_STRING: +     case T_MIXED:    case T_ZERO:    case T_VOID:
2157:       case T_STRING:    /* Common case and compat */ -  push_string_type(32); +  push_finished_type(int_type_string); +  push_type(T_STRING);    break;       case PIKE_T_NSTRING:    { -  INT32 width = GETC(); -  push_string_type(width); +  low_decode_type(data); +  push_type(T_STRING);    }    break;