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.147 2001/02/19 23:50:02 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.148 2001/02/20 15:59:50 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:237:   #endif   }      void type_stack_reverse(void)   {    ptrdiff_t a;    a=pop_stack_mark();    reverse((char *)(Pike_compiler->type_stackp-a),a,1);   }    - void push_type_int(INT32 i) + static void push_type_int(INT32 i)   {    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) + static void push_type_int_backwards(INT32 i)   {    int e;    for(e=(int)sizeof(i);e-->0;)    push_type( (i>>(e*8)) & 0xff );   }    -  + void push_int_type(INT32 min, INT32 max) + { +  push_type_int(max); +  push_type_int(min); +  push_type(T_INT); + } +  + void push_object_type(int flag, INT32 id) + { +  push_type_int(id); +  push_type(flag); +  push_type(T_OBJECT); + } +  + void push_object_type_backwards(int flag, INT32 id) + { +  unsafe_push_type(T_OBJECT); +  unsafe_push_type(flag); +  push_type_int_backwards(id); + } +    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)