pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: pike_types.c,v 1.134 2000/08/15 16:01:14 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.135 2000/08/16 10:30:46 grubba Exp $");   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"   #include "stralloc.h"   #include "stuff.h"   #include "array.h"   #include "program.h"   #include "constants.h"   #include "object.h"   #include "multiset.h"
pike.git/src/pike_types.c:228:   {    Pike_compiler->type_stackp-=pop_stack_mark();   #ifdef PIKE_DEBUG    if(Pike_compiler->type_stackp<type_stack)    fatal("Type stack underflow\n");   #endif   }      void type_stack_reverse(void)   { -  INT32 a; +  ptrdiff_t a;    a=pop_stack_mark();    reverse((char *)(Pike_compiler->type_stackp-a),a,1);   }      void push_type_int(INT32 i)   { -  int e; -  for(e=0;e<(int)sizeof(i);e++) -  push_type( (i>>(e*8)) & 0xff ); +  ptrdiff_t e; +  for(e = 0; e < (ptrdiff_t)sizeof(i); e++) +  push_type(DO_NOT_WARN((unsigned char)((i>>(e*8)) & 0xff)));   }      void push_type_int_backwards(INT32 i)   {    int e;    for(e=(int)sizeof(i);e-->0;)    push_type( (i>>(e*8)) & 0xff );   }      INT32 extract_type_int(char *p)   {    int e;    INT32 ret=0;    for(e=0;e<(int)sizeof(INT32);e++)    ret=(ret<<8) | EXTRACT_UCHAR(p+e);    return ret;   }      void push_unfinished_type(char *s)   { -  int e; +  ptrdiff_t e;    e=type_length(s);    for(e--;e>=0;e--) push_type(s[e]);   }      static void push_unfinished_type_with_markers(char *s,    struct pike_string **am)   {    int d,e,c;    ptrdiff_t len=type_length(s);   
pike.git/src/pike_types.c:329:   void push_finished_type_backwards(struct pike_string *type)   {    int e;    check_type_string(type);    MEMCPY(Pike_compiler->type_stackp, type->str, type->len);    Pike_compiler->type_stackp+=type->len;   }      struct pike_string *debug_pop_unfinished_type(void)   { -  int len,e; +  ptrdiff_t len, e;    struct pike_string *s;    len=pop_stack_mark();    s=begin_shared_string(len);    Pike_compiler->type_stackp-=len;    MEMCPY(s->str, Pike_compiler->type_stackp, len);    reverse(s->str, len, 1);    s=end_shared_string(s);    check_type_string(s);    return s;   }