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.240 2007/03/03 16:46:12 grubba Exp $ + || $Id: encode.c,v 1.241 2007/04/26 11:13:22 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:293:    } else {    addchar(t->type);    }    switch(t->type) {    default:    Pike_fatal("error in type tree: %d.\n", t->type);    /*NOTREACHED*/       break;    +  case PIKE_T_ATTRIBUTE: /* FIXME: Strip this in compat mode. */    case PIKE_T_NAME:    {    struct svalue sval;    sval.type = PIKE_T_STRING;    sval.subtype = 0;    sval.u.string = (void *)t->car;       encode_value2(&sval, data, 0);    }    t=t->cdr;
pike.git/src/encode.c:2177:    case '8':    case '9':    case T_FLOAT:    case T_MIXED:    case T_ZERO:    case T_VOID:    case PIKE_T_UNKNOWN:    push_type(tmp);    break;    +  case PIKE_T_ATTRIBUTE: +  decode_value2(data); +  +  if (Pike_sp[-1].type != PIKE_T_STRING) { +  Pike_error("decode_value(): Type attribute is not a string (%s)\n", +  get_name_of_type(Pike_sp[-1].type)); +  } +  low_decode_type(data); +  push_type_attribute(Pike_sp[-1].u.string); +  pop_stack(); +  break; +     case PIKE_T_NAME:    decode_value2(data);       if (Pike_sp[-1].type != PIKE_T_STRING) {    Pike_error("decode_value(): Type name is not a string (%s)\n",    get_name_of_type(Pike_sp[-1].type));    }    low_decode_type(data);    push_type_name(Pike_sp[-1].u.string);    pop_stack();