Branch: Tag:

2005-05-18

2005-05-18 12:36:54 by Martin Stjernholm <mast@lysator.liu.se>

Fixed various type errors for 64 bit architectures. (Most are in harmless
debug messages, but anyway..)

Rev: src/array.c:1.164
Rev: src/backend.cmod:1.146
Rev: src/builtin_functions.c:1.555
Rev: src/code/bytecode.h:1.11
Rev: src/encode.c:1.214
Rev: src/gc.c:1.257
Rev: src/interpret_functions.h:1.170
Rev: src/las.c:1.347
Rev: src/modules/Gmp/mpz_glue.c:1.162
Rev: src/modules/Image/encodings/xcf.c:1.49
Rev: src/modules/Parser/html.c:1.173
Rev: src/modules/files/file.c:1.321
Rev: src/modules/files/sendfile.c:1.70
Rev: src/modules/spider/xml.c:1.71
Rev: src/object.c:1.257
Rev: src/peep.c:1.99
Rev: src/pike_types.c:1.236
Rev: src/post_modules/Shuffler/a_source_system_memory.c:1.11
Rev: src/program.c:1.566
Rev: src/svalue.c:1.195
Rev: src/threads.c:1.238

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: array.c,v 1.163 2005/02/14 15:54:59 mast Exp $ + || $Id: array.c,v 1.164 2005/05/18 12:36:53 mast Exp $   */      #include "global.h"
27:   #include "multiset.h"   #include "mapping.h"    - RCSID("$Id: array.c,v 1.163 2005/02/14 15:54:59 mast Exp $"); + RCSID("$Id: array.c,v 1.164 2005/05/18 12:36:53 mast Exp $");      PMOD_EXPORT struct array empty_array=   {
91:    return &empty_array;    }    -  if( (size+extra_space-1) > +  if( (size_t) (size+extra_space-1) >    (ULONG_MAX-sizeof(struct array))/sizeof(struct svalue) )    Pike_error("Too large array (memory size exceeds size of size_t)\n");    v=(struct array *)malloc(sizeof(struct array)+
270:    if (a->size) {    index_error(0,0,0,&tmp,ind,    "Index %"PRINTPIKEINT"d is out of array range " -  "%"PRINTPTRDIFFT"d..%"PRINTPTRDIFFT"d.\n", -  p, -a->size, a->size-1); +  "%d..%d.\n", p, -a->size, a->size-1);    } else {    index_error(0,0,0,&tmp,ind,    "Attempt to index the empty array with %"PRINTPIKEINT"d.\n", p);
323:    if(i<0 || i>=a->size) {    if (a->size) {    Pike_error("Index %"PRINTPIKEINT"d is out of array range " -  "%"PRINTPTRDIFFT"d..%"PRINTPTRDIFFT"d.\n", -  p, -a->size, a->size-1); +  "%d..%d.\n", p, -a->size, a->size-1);    } else {    Pike_error("Attempt to index the empty array with %"PRINTPIKEINT"d.\n", p);    }
1288:    if(i<0 || i>=a->size) {    if (a->size) {    Pike_error("Index %"PRINTPIKEINT"d is out of array range " -  "%"PRINTPTRDIFFT"d..%"PRINTPTRDIFFT"d.\n", -  p, -a->size, a->size-1); +  "%d..%d.\n", p, -a->size, a->size-1);    } else {    Pike_error("Attempt to index the empty array with %"PRINTPIKEINT"d.\n", p);    }
2155:    check_stack(120 + args + 1);       /* FIXME: Ought to use a better key on the arguments below. */ -  if (!(cycl = (struct array *)BEGIN_CYCLIC(a, args))) { +  if (!(cycl = (struct array *)BEGIN_CYCLIC(a, (ptrdiff_t) args))) {    BEGIN_AGGREGATE_ARRAY(a->size) {    SET_CYCLIC_RET(Pike_sp[-1].u.array);    for (e=0;e<a->size;e++) {