diff --git a/src/cpp.c b/src/cpp.c index 9b718f1cc4cf0fc0e4ff04b69fccb6007bf9c8f1..de279114eaa226e7bf3154e854a6fca03a4308be 100644 --- a/src/cpp.c +++ b/src/cpp.c @@ -5,7 +5,7 @@ \*/ /* - * $Id: cpp.c,v 1.68 2000/08/09 13:25:10 grubba Exp $ + * $Id: cpp.c,v 1.69 2000/08/10 08:39:37 grubba Exp $ */ #include "global.h" #include "stralloc.h" @@ -732,9 +732,9 @@ static struct pike_string *filter_bom(struct pike_string *data) * * Character 0xfeff (ZERO WIDTH NO-BREAK SPACE = BYTE ORDER MARK = BOM) * needs to be filtered away before processing continues. */ - int i; - int j = 0; - int len = data->len; + ptrdiff_t i; + ptrdiff_t j = 0; + ptrdiff_t len = data->len; struct string_builder buf; /* Add an extra reference to data here, since we may return it as is. */ diff --git a/src/interpret.c b/src/interpret.c index a5821d0c0f348fd30b188c41769198bb04b4b222..a09c813ad56b7fe8a61bc165b8dac7feaa7240aa 100644 --- a/src/interpret.c +++ b/src/interpret.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: interpret.c,v 1.161 2000/08/10 08:35:24 grubba Exp $"); +RCSID("$Id: interpret.c,v 1.162 2000/08/10 08:38:20 grubba Exp $"); #include "interpret.h" #include "object.h" #include "program.h" @@ -675,7 +675,8 @@ PMOD_EXPORT void mega_apply2(enum apply_type type, INT32 args, void *arg1, void { struct object *o; struct pike_frame *scope=0; - int fun, tailrecurse=-1; + int tailrecurse=-1; + ptrdiff_t fun; struct svalue *save_sp=Pike_sp-args; #ifdef PROFILING @@ -853,8 +854,8 @@ PMOD_EXPORT void mega_apply2(enum apply_type type, INT32 args, void *arg1, void case APPLY_LOW: - o=(struct object *)arg1; - fun=(long)arg2; + o = (struct object *)arg1; + fun = (ptrdiff_t)arg2; apply_low: scope=0; @@ -898,8 +899,8 @@ PMOD_EXPORT void mega_apply2(enum apply_type type, INT32 args, void *arg1, void #ifdef PIKE_DEBUG if(fun>=(int)p->num_identifier_references) { - fprintf(stderr, "Function index out of range. %d >= %d\n", - fun, (int)p->num_identifier_references); + fprintf(stderr, "Function index out of range. %ld >= %d\n", + (long)fun, (int)p->num_identifier_references); fprintf(stderr,"########Program is:\n"); describe(p); fprintf(stderr,"########Object is:\n"); diff --git a/src/stralloc.h b/src/stralloc.h index 4cca57025618353a6bdd10f03904e926239e24af..27bedcf3d128ee64baea6ed4588c276753d9d291 100644 --- a/src/stralloc.h +++ b/src/stralloc.h @@ -5,7 +5,7 @@ \*/ /* - * $Id: stralloc.h,v 1.50 2000/08/09 18:46:31 grubba Exp $ + * $Id: stralloc.h,v 1.51 2000/08/10 08:42:26 grubba Exp $ */ #ifndef STRALLOC_H #define STRALLOC_H @@ -160,11 +160,12 @@ CONVERT(2,1) PMOD_EXPORT int generic_compare_strings(const void *a,int alen, int asize, const void *b,int blen, int bsize); PMOD_EXPORT void generic_memcpy(PCHARP to, - PCHARP from, - int len); + PCHARP from, + int len); PMOD_EXPORT INLINE void pike_string_cpy(PCHARP to, - struct pike_string *from); -PMOD_EXPORT struct pike_string *binary_findstring(const char *foo, INT32 l); + struct pike_string *from); +PMOD_EXPORT struct pike_string *binary_findstring(const char *foo, + ptrdiff_t l); PMOD_EXPORT struct pike_string *findstring(const char *foo); PMOD_EXPORT struct pike_string *debug_begin_shared_string(size_t len); PMOD_EXPORT struct pike_string *debug_begin_wide_shared_string(size_t len, int shift);