pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:1:   /*   || 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"   #include "stralloc.h"   #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "interpret.h"   #include "svalue.h"   #include "mapping.h"
pike.git/src/encode.c:275:    * type string would have been encoded (cf T_FUNCTION, T_MANY,    * T_STRING, PIKE_T_NSTRING).    */   static void encode_type(struct pike_type *t, struct encode_data *data)   {    one_more_type:    if (t->type == T_MANY) {    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 {    addchar(t->type);    }    switch(t->type) {    default:    Pike_fatal("error in type tree: %d.\n", t->type);    /*NOTREACHED*/   
pike.git/src/encode.c:373:    case '1':    case '2':    case '3':    case '4':    case '5':    case '6':    case '7':    case '8':    case '9':    case T_FLOAT: -  case T_STRING: +     case T_MIXED:    case T_ZERO:    case T_VOID:    case PIKE_T_UNKNOWN:    break;       case T_OBJECT:    {    addchar(CAR_TO_INT(t));   
pike.git/src/encode.c:2150:    max = GETC();    max = (max<<8)|GETC();    max = (max<<8)|GETC();    max = (max<<8)|GETC();    push_int_type(min, max);    }    break;       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;       case '0':    case '1':    case '2':    case '3':    case '4':    case '5':    case '6':