pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:266:    num -= (((INT64)256) << (t<<3));    else    break;    }       tag |= t << SIZE_SHIFT;    addchar_unsafe((char)tag);       switch(t)    { -  case 3: addchar_unsafe((char)((num >> 24)&0xff)); -  case 2: addchar_unsafe((char)((num >> 16)&0xff)); -  case 1: addchar_unsafe((char)((num >> 8)&0xff)); +  case 3: addchar_unsafe((char)((num >> 24)&0xff)); /* FALLTHRU */ +  case 2: addchar_unsafe((char)((num >> 16)&0xff)); /* FALLTHRU */ +  case 1: addchar_unsafe((char)((num >> 8)&0xff)); /* FALLTHRU */    case 0: addchar_unsafe((char)(num&0xff));    }   }      static void code_number(ptrdiff_t num, struct encode_data *data)   {    EDB(5, fprintf(stderr, "%*scode_number(%d)\n",    data->depth, "", num));    code_entry(num & 15, num >> 4, data);   }
pike.git/src/encode.c:337:    t = t->cdr;    }    goto one_more_type;       case T_FUNCTION:    while(t->type == T_FUNCTION) {    encode_type(t->car, data);    t = t->cdr;    }    addchar(T_MANY); -  /* FALL_THROUGH */ +  /* FALLTHRU */    case T_MANY:    encode_type(t->car, data);    t = t->cdr;    goto one_more_type;       case T_SCOPE:    {    ptrdiff_t val = CAR_TO_INT(t);    addchar(val & 0xff);    }
pike.git/src/encode.c:652:   #else    d<0.0   #endif    ) {    switch(pike_ftype)    {    case Pike_FP_PINF:    pike_ftype=Pike_FP_NINF;    break;    + #ifdef HAVE_ISZERO    case Pike_FP_PZERO:    pike_ftype=Pike_FP_NZERO;    break; -  + #endif    }    }       if(pike_ftype != Pike_FP_UNKNOWN)    {    code_entry(TAG_FLOAT,0,data);    code_entry(TAG_FLOAT,pike_ftype,data);    break;    }    }
pike.git/src/encode.c:869:    if (fun < 0)    Pike_error("Cannot encode objects without an "    "\"encode_object\" function in the codec.\n");    apply_low(data->codec,fun,1);       /* Put value back in cache for future reference -Hubbe */    mapping_insert(data->encoded, val, &tmp);    }    break;    } -  /* FALL THROUGH */ +  /* FALLTHRU */       default:    code_entry(TAG_OBJECT, 0,data);    break;    }    encode_value2(Pike_sp-1, data, 0);    pop_stack();    break;       case T_FUNCTION:
pike.git/src/encode.c:929:       code_entry(TAG_FUNCTION, 0, data);    encode_value2(Pike_sp-1, data, 0);    pop_stack();    break;          case T_PROGRAM:    {    int d; -  if (val->u.program->id < PROG_DYNAMIC_ID_START) { +  if ((val->u.program->id < PROG_DYNAMIC_ID_START) && +  (val->u.program->id >= 0)) {    code_entry(TAG_PROGRAM, 3, data);    push_int(val->u.program->id);    encode_value2(Pike_sp-1, data, 0);    pop_stack();    break;    }    if (data->canonic)    Pike_error("Canonical encoding of programs not supported.\n");    if (!(val->u.program->flags & PROGRAM_FIXED))    Pike_error("Encoding of unfixated programs not supported.\n");
pike.git/src/encode.c:1736:    *! @seealso    *! @[decode_value()], @[sprintf()], @[encode_value_canonic()]    */   void f_encode_value(INT32 args)   {    ONERROR tmp;    struct encode_data d, *data;    int i;    data=&d;    -  check_all_args("encode_value", args, +  check_all_args(NULL, args,    BIT_MIXED,    BIT_VOID | BIT_OBJECT | BIT_ZERO,   #ifdef ENCODE_DEBUG    /* This argument is only an internal debug helper.    * It's intentionally not part of the function    * prototype, to keep the argument position free for    * other uses in the future. */    BIT_VOID | BIT_INT,   #endif    0);
pike.git/src/encode.c:1814:    *! @seealso    *! @[encode_value()], @[decode_value()]    */   void f_encode_value_canonic(INT32 args)   {    ONERROR tmp;    struct encode_data d, *data;    int i;    data=&d;    -  check_all_args("encode_value_canonic", args, +  check_all_args(NULL, args,    BIT_MIXED,    BIT_VOID | BIT_OBJECT | BIT_ZERO,   #ifdef ENCODE_DEBUG    /* This argument is only an internal debug helper.    * It's intentionally not part of the function    * prototype, to keep the argument position free for    * other uses in the future. */    BIT_VOID | BIT_INT,   #endif    0);
pike.git/src/encode.c:3045:       enter_compiler(NULL, 0);       c = THIS_COMPILATION;       /* We don't want to be affected by #pragma save_parent or    * __pragma_save_parent__.    */    old_pragmas = c->lex.pragmas;    c->lex.pragmas = (old_pragmas & ~ID_SAVE_PARENT)|ID_DONT_SAVE_PARENT; +  /* We also don't want to generate deprecation warnings. */ +  c->lex.pragmas |= ID_NO_DEPRECATION_WARNINGS;       /* Start the new program. */ -  low_start_new_program(p, 1, NULL, 0, NULL); +  low_start_new_program(p, COMPILER_PASS_FIRST, NULL, 0, NULL);    p = Pike_compiler->new_program;    p->flags = p_flags;       /* Kludge to get end_first_pass() to free the program. */    Pike_compiler->num_parse_error++;       SET_ONERROR(err, cleanup_new_program_decode, NULL);       {    int fun = find_identifier("__register_new_program",
pike.git/src/encode.c:4355:    */   void f_decode_value(INT32 args)   {    struct pike_string *s;    struct object *codec;      #ifdef ENCODE_DEBUG    int debug = 0;   #endif /* ENCODE_DEBUG */    -  check_all_args("decode_value", args, +  check_all_args(NULL, args,    BIT_STRING,    BIT_VOID | BIT_OBJECT | BIT_ZERO,   #ifdef ENCODE_DEBUG    /* This argument is only an internal debug helper.    * It's intentionally not part of the function    * prototype, to keep the argument position free for    * other uses in the future. */    BIT_VOID | BIT_INT,   #endif    0);