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.227 2004/12/20 13:14:49 mast Exp $ + || $Id: encode.c,v 1.228 2005/05/19 22:35:26 mast 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:2274:    ONERROR err;       if ((string_no < 0) || (string_no >= p->num_strings)) {    Pike_error("Bad bytecode string number: %d (expected 0 - %d).\n",    string_no, p->num_strings-1);    }       bytecode = p->strings[string_no];       if (bytecode->len % 3) { -  Pike_error("Bad bytecode string length: %d (expected multiple of 3).\n", +  Pike_error("Bad bytecode string length: " +  "%"PRINTPTRDIFFT"d (expected multiple of 3).\n",    bytecode->len);    }       init_bytecode();       SET_ONERROR(err, exit_bytecode, NULL);       switch(bytecode->size_shift) {   #define SIGNED_CHAR(X) X   
pike.git/src/encode.c:3458:    * just like when it's created there. */    p = delayed_enc_val->u.program;    }    else    p = NULL;       /* We don't want to be affected by #pragma save_parent or    * __pragma_save_parent__.    */    lex.pragmas = (old_pragmas & ~ID_SAVE_PARENT)|ID_DONT_SAVE_PARENT; -  SET_ONERROR(err2, set_lex_pragmas, old_pragmas); +  SET_ONERROR(err2, set_lex_pragmas, (ptrdiff_t) old_pragmas);       /* Start the new program. */    orig_compilation_depth = compilation_depth;    compilation_depth = -1;    low_start_new_program(p, 1, NULL, 0, NULL);    p = Pike_compiler->new_program;       p->flags = p_flags;       /* Kludge to get end_first_pass() to free the program. */
pike.git/src/encode.c:3556:    PIKE_OPCODE_T opcode;    MEMCPY(&opcode, data->data + data->ptr, sizeof(PIKE_OPCODE_T));    data->ptr += sizeof(PIKE_OPCODE_T);    add_to_program(opcode);    }       /* Decode relocations */    for (e=0; e<(int)local_num_relocations; e++) {    size_t reloc;    decode_number(reloc, data); -  CHECK_RELOC(reloc, local_num_program); +  CHECK_RELOC(reloc, (size_t) local_num_program);    add_to_relocations(reloc);    }       /* Perform relocation. */   #ifdef DECODE_PROGRAM    DECODE_PROGRAM(p);   #endif /* DECODE_PROGRAM */    make_program_executable(p);       /* Decode linenumbers */
pike.git/src/encode.c:4101:    local_num_relocations = p->num_relocations;    local_num_linenumbers = p->num_linenumbers;    }       /* Verify... */   #define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \    if (PIKE_CONCAT(local_num_, NAME) != p->PIKE_CONCAT(num_,NAME)) { \    ref_push_program (p); \    decode_error(Pike_sp - 1, NULL, \    "Value mismatch for num_" TOSTR(NAME) ": " \ -  "%d != %d (bytecode method: %d)\n", \ -  PIKE_CONCAT(local_num_, NAME), \ -  p->PIKE_CONCAT(num_, NAME), \ +  "%"PRINTSIZET"d != %"PRINTSIZET"d " \ +  "(bytecode method: %d)\n", \ +  (size_t) PIKE_CONCAT(local_num_, NAME), \ +  (size_t) p->PIKE_CONCAT(num_, NAME), \    bytecode_method); \    }   #include "program_areas.h"       /* Decode the actual constants    *    * This must be done after the program has been ended.    */    for (e=0; e<local_num_constants; e++) {    struct program_constant *constant = p->constants+e;