From 7e877a61f4ef9bb02c4b2ee97c96b2e5d8073dc2 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Wed, 2 Apr 2003 21:22:44 +0200 Subject: [PATCH] Extended all integer argument types shorter than int to int since that's more efficient. Rev: src/constants.c:1.47 Rev: src/constants.h:1.30 Rev: src/docode.c:1.164 Rev: src/docode.h:1.18 Rev: src/dynamic_buffer.c:1.23 Rev: src/dynamic_buffer.h:1.18 Rev: src/encode.c:1.171 Rev: src/gc.c:1.216 Rev: src/global.h:1.85 Rev: src/las.c:1.334 Rev: src/las.h:1.62 Rev: src/multiset.c:1.71 Rev: src/pike_memory.c:1.145 Rev: src/pike_memory.h:1.44 Rev: src/pike_search.c:1.14 Rev: src/pike_search.h:1.7 Rev: src/pike_types.c:1.214 Rev: src/pike_types.h:1.86 Rev: src/port.h:1.50 Rev: src/program.c:1.497 Rev: src/program.h:1.181 Rev: src/program_areas.h:1.13 Rev: src/rbtree.h:1.10 Rev: src/svalue.h:1.118 --- src/constants.c | 14 +++++++------- src/constants.h | 12 ++++++------ src/docode.c | 26 +++++++++++++------------- src/docode.h | 4 ++-- src/dynamic_buffer.c | 8 ++++---- src/dynamic_buffer.h | 6 +++--- src/encode.c | 27 ++++++++++++++------------- src/gc.c | 10 +++++----- src/global.h | 4 ++-- src/las.c | 6 +++--- src/las.h | 4 ++-- src/multiset.c | 12 ++++++------ src/pike_memory.c | 18 +++++++++--------- src/pike_memory.h | 8 ++++---- src/pike_search.c | 8 ++++---- src/pike_search.h | 8 ++++---- src/pike_types.c | 10 +++++----- src/pike_types.h | 8 ++++---- src/port.h | 10 +++++----- src/program.c | 44 ++++++++++++++++++++++---------------------- src/program.h | 26 +++++++++++++------------- src/program_areas.h | 22 +++++++++++----------- src/rbtree.h | 4 ++-- src/svalue.h | 4 ++-- 24 files changed, 152 insertions(+), 151 deletions(-) diff --git a/src/constants.c b/src/constants.c index 79c15fa698..9ba3a8700d 100644 --- a/src/constants.c +++ b/src/constants.c @@ -2,7 +2,7 @@ || 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: constants.c,v 1.46 2003/03/26 18:53:46 nilsson Exp $ +|| $Id: constants.c,v 1.47 2003/04/02 19:22:42 mast Exp $ */ #include "global.h" @@ -18,7 +18,7 @@ #include "security.h" #include "block_alloc.h" -RCSID("$Id: constants.c,v 1.46 2003/03/26 18:53:46 nilsson Exp $"); +RCSID("$Id: constants.c,v 1.47 2003/04/02 19:22:42 mast Exp $"); struct mapping *builtin_constants = 0; @@ -75,7 +75,7 @@ int global_callable_flags=0; PMOD_EXPORT struct callable *low_make_callable(c_fun fun, struct pike_string *name, struct pike_type *type, - INT16 flags, + int flags, optimize_fun optimize, docode_fun docode) { @@ -104,7 +104,7 @@ PMOD_EXPORT struct callable *low_make_callable(c_fun fun, PMOD_EXPORT struct callable *make_callable(c_fun fun, const char *name, const char *type, - INT16 flags, + int flags, optimize_fun optimize, docode_fun docode) { @@ -115,7 +115,7 @@ PMOD_EXPORT struct callable *make_callable(c_fun fun, PMOD_EXPORT struct callable *add_efun2(const char *name, c_fun fun, const char *type, - INT16 flags, + int flags, optimize_fun optimize, docode_fun docode) { @@ -133,7 +133,7 @@ PMOD_EXPORT struct callable *add_efun2(const char *name, return ret; } -PMOD_EXPORT struct callable *add_efun(const char *name, c_fun fun, const char *type, INT16 flags) +PMOD_EXPORT struct callable *add_efun(const char *name, c_fun fun, const char *type, int flags) { return add_efun2(name,fun,type,flags,0,0); } @@ -141,7 +141,7 @@ PMOD_EXPORT struct callable *add_efun(const char *name, c_fun fun, const char *t PMOD_EXPORT struct callable *quick_add_efun(const char *name, ptrdiff_t name_length, c_fun fun, const char *type, ptrdiff_t type_length, - INT16 flags, + int flags, optimize_fun optimize, docode_fun docode) { diff --git a/src/constants.h b/src/constants.h index 8f26ce5337..04ae097a16 100644 --- a/src/constants.h +++ b/src/constants.h @@ -2,7 +2,7 @@ || 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: constants.h,v 1.29 2003/03/26 18:53:46 nilsson Exp $ +|| $Id: constants.h,v 1.30 2003/04/02 19:22:42 mast Exp $ */ #ifndef ADD_EFUN_H @@ -45,26 +45,26 @@ BLOCK_ALLOC_FILL_PAGES(callable,2) PMOD_EXPORT struct callable *low_make_callable(c_fun fun, struct pike_string *name, struct pike_type *type, - INT16 flags, + int flags, optimize_fun optimize, docode_fun docode); PMOD_EXPORT struct callable *make_callable(c_fun fun, const char *name, const char *type, - INT16 flags, + int flags, optimize_fun optimize, docode_fun docode); PMOD_EXPORT struct callable *add_efun2(const char *name, c_fun fun, const char *type, - INT16 flags, + int flags, optimize_fun optimize, docode_fun docode); -PMOD_EXPORT struct callable *add_efun(const char *name, c_fun fun, const char *type, INT16 flags); +PMOD_EXPORT struct callable *add_efun(const char *name, c_fun fun, const char *type, int flags); PMOD_EXPORT struct callable *quick_add_efun(const char *name, ptrdiff_t name_length, c_fun fun, const char *type, ptrdiff_t type_length, - INT16 flags, + int flags, optimize_fun optimize, docode_fun docode); void init_builtin_constants(void); diff --git a/src/docode.c b/src/docode.c index 73efe83518..aa770abb51 100644 --- a/src/docode.c +++ b/src/docode.c @@ -2,11 +2,11 @@ || 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: docode.c,v 1.163 2003/02/24 21:00:44 mast Exp $ +|| $Id: docode.c,v 1.164 2003/04/02 19:22:42 mast Exp $ */ #include "global.h" -RCSID("$Id: docode.c,v 1.163 2003/02/24 21:00:44 mast Exp $"); +RCSID("$Id: docode.c,v 1.164 2003/04/02 19:22:42 mast Exp $"); #include "las.h" #include "program.h" #include "pike_types.h" @@ -30,7 +30,7 @@ RCSID("$Id: docode.c,v 1.163 2003/02/24 21:00:44 mast Exp $"); #include "mapping.h" #include "multiset.h" -static int do_docode2(node *n, INT16 flags); +static int do_docode2(node *n, int flags); typedef void (*cleanup_func)(void *); @@ -284,7 +284,7 @@ void do_escape_catch(void) #define DO_CODE_BLOCK(X) do_pop(do_docode((X),DO_NOT_COPY | DO_POP )) -int do_docode(node *n, INT16 flags) +int do_docode(node *n, int flags) { int i; int stack_depth_save = current_stack_depth; @@ -308,9 +308,9 @@ static int is_efun(node *n, c_fun fun) n->u.sval.u.efun->function == fun; } -static void code_expression(node *n, INT16 flags, char *err) +static void code_expression(node *n, int flags, char *err) { - switch(do_docode(check_node_hash(n), (INT16)(flags & ~DO_POP))) + switch(do_docode(check_node_hash(n), flags & ~DO_POP)) { case 0: my_yyerror("Void expression for %s",err); case 1: return; @@ -362,7 +362,7 @@ void do_cond_jump(node *n, int label, int iftrue, int flags) return; } - code_expression(n, (INT16)(flags | DO_NOT_COPY), "condition"); + code_expression(n, flags | DO_NOT_COPY, "condition"); if(flags & DO_POP) { @@ -537,7 +537,7 @@ static void emit_apply_builtin(char *func) } static int do_encode_automap_arg_list(node *n, - INT16 flags) + int flags) { int stack_depth_save = current_stack_depth; if(!n) return 0; @@ -596,7 +596,7 @@ static void emit_builtin_svalue(char *func) free_node(n); } -static int do_docode2(node *n, INT16 flags) +static int do_docode2(node *n, int flags) { ptrdiff_t tmp1,tmp2,tmp3; @@ -1569,7 +1569,7 @@ static int do_docode2(node *n, INT16 flags) n = CAR(n); } /* CAR(n) is not F_ARG_LIST or F_COMMA_EXPR */ - tmp1 += do_docode(CAR(n), (INT16)(flags & ~WANT_LVALUE)); + tmp1 += do_docode(CAR(n), flags & ~WANT_LVALUE); do { if (CDR(n)) { @@ -1584,7 +1584,7 @@ static int do_docode2(node *n, INT16 flags) } /* CDR(n) is not F_ARG_LIST or F_COMMA_EXPR */ if (n->parent) { - tmp1 += do_docode(CDR(n), (INT16)(flags & ~WANT_LVALUE)); + tmp1 += do_docode(CDR(n), flags & ~WANT_LVALUE); } else { tmp1 += do_docode(CDR(n), flags); } @@ -2003,7 +2003,7 @@ static int do_docode2(node *n, INT16 flags) { int mklval=CAR(n) && match_types(CAR(n)->type, string_type_string); tmp1 = do_docode(CAR(n), - (INT16)(mklval ? DO_LVALUE_IF_POSSIBLE : 0)); + mklval ? DO_LVALUE_IF_POSSIBLE : 0); if(tmp1==2) { #ifdef PIKE_DEBUG @@ -2226,7 +2226,7 @@ static int do_docode2(node *n, INT16 flags) case F_VAL_LVAL: return do_docode(CAR(n),flags) + - do_docode(CDR(n), (INT16)(flags | DO_LVALUE)); + do_docode(CDR(n), flags | DO_LVALUE); case F_AUTO_MAP: emit0(F_MARK); diff --git a/src/docode.h b/src/docode.h index 9187914016..8143def21e 100644 --- a/src/docode.h +++ b/src/docode.h @@ -2,7 +2,7 @@ || 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: docode.h,v 1.17 2002/10/11 01:39:30 nilsson Exp $ +|| $Id: docode.h,v 1.18 2003/04/02 19:22:42 mast Exp $ */ #ifndef DOCODE_H @@ -32,7 +32,7 @@ INT32 pop_address(void); int alloc_label(void); int do_jump(int token,INT32 lbl); void do_pop(int x); -int do_docode(node *n, INT16 flags); +int do_docode(node *n, int flags); void do_cond_jump(node *n, int label, int iftrue, int flags); INT32 do_code_block(node *n); int docode(node *n); diff --git a/src/dynamic_buffer.c b/src/dynamic_buffer.c index edf0528ba6..baa6218a40 100644 --- a/src/dynamic_buffer.c +++ b/src/dynamic_buffer.c @@ -2,7 +2,7 @@ || 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: dynamic_buffer.c,v 1.22 2002/10/20 22:05:07 marcus Exp $ +|| $Id: dynamic_buffer.c,v 1.23 2003/04/02 19:22:43 mast Exp $ */ #include "global.h" @@ -11,7 +11,7 @@ #include "pike_error.h" #include "pike_memory.h" -RCSID("$Id: dynamic_buffer.c,v 1.22 2002/10/20 22:05:07 marcus Exp $"); +RCSID("$Id: dynamic_buffer.c,v 1.23 2003/04/02 19:22:43 mast Exp $"); static dynamic_buffer buff; @@ -39,7 +39,7 @@ PMOD_EXPORT char *low_make_buf_space(size_t space, dynamic_buffer *buf) return ret; } -PMOD_EXPORT void low_my_putchar(char b,dynamic_buffer *buf) +PMOD_EXPORT void low_my_putchar(int b,dynamic_buffer *buf) { #ifdef PIKE_DEBUG if(!buf->s.str) @@ -128,7 +128,7 @@ PMOD_EXPORT struct pike_string *debug_low_free_buf(dynamic_buffer *buf) PMOD_EXPORT struct pike_string *debug_free_buf(void) { return low_free_buf(&buff); } PMOD_EXPORT char *make_buf_space(INT32 space) { return low_make_buf_space(space,&buff); } -PMOD_EXPORT void my_putchar(char b) { low_my_putchar(b,&buff); } +PMOD_EXPORT void my_putchar(int b) { low_my_putchar(b,&buff); } PMOD_EXPORT void my_binary_strcat(const char *b, ptrdiff_t l) { low_my_binary_strcat(b,l,&buff); } PMOD_EXPORT void my_strcat(const char *b) { my_binary_strcat(b,strlen(b)); } PMOD_EXPORT void initialize_global_buf(void) { buff.s.str = NULL; } diff --git a/src/dynamic_buffer.h b/src/dynamic_buffer.h index 50b65df576..b77b1f38bf 100644 --- a/src/dynamic_buffer.h +++ b/src/dynamic_buffer.h @@ -2,7 +2,7 @@ || 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: dynamic_buffer.h,v 1.17 2002/10/20 22:05:07 marcus Exp $ +|| $Id: dynamic_buffer.h,v 1.18 2003/04/02 19:22:43 mast Exp $ */ #ifndef DYNAMIC_BUFFER_H @@ -28,7 +28,7 @@ typedef struct dynamic_buffer_s dynamic_buffer; /* Prototypes begin here */ PMOD_EXPORT char *low_make_buf_space(size_t space, dynamic_buffer *buf); -PMOD_EXPORT void low_my_putchar(char b,dynamic_buffer *buf); +PMOD_EXPORT void low_my_putchar(int b,dynamic_buffer *buf); PMOD_EXPORT void low_my_binary_strcat(const char *b, size_t l, dynamic_buffer *buf); PMOD_EXPORT void debug_initialize_buf(dynamic_buffer *buf); PMOD_EXPORT void low_reinit_buf(dynamic_buffer *buf); @@ -39,7 +39,7 @@ PMOD_EXPORT char *simple_free_buf(void); PMOD_EXPORT struct pike_string *debug_low_free_buf(dynamic_buffer *buf); PMOD_EXPORT struct pike_string *debug_free_buf(void); PMOD_EXPORT char *make_buf_space(INT32 space); -PMOD_EXPORT void my_putchar(char b); +PMOD_EXPORT void my_putchar(int b); PMOD_EXPORT void my_binary_strcat(const char *b, ptrdiff_t l); PMOD_EXPORT void my_strcat(const char *b); PMOD_EXPORT void initialize_global_buf(void); diff --git a/src/encode.c b/src/encode.c index a11c97456f..dd899c520f 100644 --- a/src/encode.c +++ b/src/encode.c @@ -2,7 +2,7 @@ || 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.170 2003/03/28 23:54:24 mast Exp $ +|| $Id: encode.c,v 1.171 2003/04/02 19:22:43 mast Exp $ */ #include "global.h" @@ -27,7 +27,7 @@ #include "bignum.h" #include "pikecode.h" -RCSID("$Id: encode.c,v 1.170 2003/03/28 23:54:24 mast Exp $"); +RCSID("$Id: encode.c,v 1.171 2003/04/02 19:22:43 mast Exp $"); /* #define ENCODE_DEBUG */ @@ -979,8 +979,8 @@ static void encode_value2(struct svalue *val, struct encode_data *data) encode_value2(Pike_sp-1,data); /**/ pop_stack(); -#define FOO(X,Y,Z) \ - code_number( p->PIKE_CONCAT(num_,Z), data); +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ + code_number( p->PIKE_CONCAT(num_,NAME), data); #include "program_areas.h" code_number(PIKE_BYTECODE_METHOD, data); @@ -1112,8 +1112,8 @@ static void encode_value2(struct svalue *val, struct encode_data *data) pop_stack(); /* num_* */ -#define FOO(X,Y,Z) \ - code_number( p->PIKE_CONCAT(num_,Z), data); +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ + code_number( p->PIKE_CONCAT(num_,NAME), data); #include "program_areas.h" /* Byte-code method @@ -2576,14 +2576,14 @@ static void decode_value2(struct decode_data *data) debug_malloc_touch(p); -#define FOO(X,Y,Z) \ - decode_number( p->num_##Z, data); +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ + decode_number( p->PIKE_CONCAT(num_,NAME), data); #include "program_areas.h" if(data->pass == 1) { -#define FOO(NUMTYPE,TYPE,NAME) \ +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ size=DO_ALIGN(size, ALIGNOF(TYPE)); \ size+=p->PIKE_CONCAT(num_,NAME)*sizeof(p->NAME[0]); #include "program_areas.h" @@ -2592,7 +2592,7 @@ static void decode_value2(struct decode_data *data) debug_malloc_touch(dat); MEMSET(dat,0,size); size=0; -#define FOO(NUMTYPE,TYPE,NAME) \ +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ size=DO_ALIGN(size, ALIGNOF(TYPE)); \ p->NAME=(TYPE *)(dat+size); \ size+=p->PIKE_CONCAT(num_,NAME)*sizeof(p->NAME[0]); @@ -3036,7 +3036,7 @@ static void decode_value2(struct decode_data *data) int entry_type; INT16 id_flags; INT16 p_flags; -#define FOO(NUMTYPE,Y,NAME) \ +#define FOO(NUMTYPE,Y,ARGTYPE,NAME) \ NUMTYPE PIKE_CONCAT(local_num_, NAME) = 0; #include "program_areas.h" @@ -3121,7 +3121,8 @@ static void decode_value2(struct decode_data *data) Pike_sp--; /* Decode lengths. */ -#define FOO(X,Y,NAME) decode_number(PIKE_CONCAT(local_num_, NAME), data); +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ + decode_number(PIKE_CONCAT(local_num_, NAME), data); #include "program_areas.h" /* Byte-code method */ @@ -3537,7 +3538,7 @@ static void decode_value2(struct decode_data *data) push_program(p); /* Verify... */ -#define FOO(NUMTYPE,Y,NAME) \ +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ if (PIKE_CONCAT(local_num_, NAME) != p->PIKE_CONCAT(num_,NAME)) { \ Pike_error("Value mismatch for num_" TOSTR(NAME) ": %d != %d\n", \ PIKE_CONCAT(local_num_, NAME), \ diff --git a/src/gc.c b/src/gc.c index bb7301a312..0d30f892f3 100644 --- a/src/gc.c +++ b/src/gc.c @@ -2,7 +2,7 @@ || 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: gc.c,v 1.215 2003/03/30 20:46:41 mast Exp $ +|| $Id: gc.c,v 1.216 2003/04/02 19:22:43 mast Exp $ */ #include "global.h" @@ -33,7 +33,7 @@ struct callback *gc_evaluator_callback=0; #include "block_alloc.h" -RCSID("$Id: gc.c,v 1.215 2003/03/30 20:46:41 mast Exp $"); +RCSID("$Id: gc.c,v 1.216 2003/04/02 19:22:43 mast Exp $"); int gc_enabled = 1; @@ -446,11 +446,11 @@ void describe_location(void *real_memblock, break; } -#define FOO(NTYP,TYP,NAME) \ +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ if(location == (void *)&p->NAME) fprintf(stderr,"%*s **In p->" #NAME "\n",indent,""); \ if(ptr >= (char *)p->NAME && ptr<(char*)(p->NAME+p->PIKE_CONCAT(num_,NAME))) \ fprintf(stderr,"%*s **In p->" #NAME "[%"PRINTPTRDIFFT"d]\n",indent,"", \ - ((char *)ptr - (char *)(p->NAME)) / sizeof(TYP)); + ((char *)ptr - (char *)(p->NAME)) / sizeof(TYPE)); #include "program_areas.h" break; @@ -916,7 +916,7 @@ again: if(flags & DESCRIBE_MEM) { -#define FOO(NUMTYPE,TYPE,NAME) \ +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ fprintf(stderr, "%*s* " #NAME " %p[%"PRINTSIZET"u]\n", \ indent, "", p->NAME, p->PIKE_CONCAT(num_,NAME)); #include "program_areas.h" diff --git a/src/global.h b/src/global.h index b0de5c4f20..c7ea7a9a71 100644 --- a/src/global.h +++ b/src/global.h @@ -2,7 +2,7 @@ || 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: global.h,v 1.84 2003/03/29 17:21:28 grubba Exp $ +|| $Id: global.h,v 1.85 2003/04/02 19:22:43 mast Exp $ */ #ifndef GLOBAL_H @@ -280,7 +280,7 @@ void *alloca(); #define SIZE_T unsigned INT32 -#define TYPE_T unsigned INT8 +#define TYPE_T unsigned int #define TYPE_FIELD unsigned INT16 #define B1_T char diff --git a/src/las.c b/src/las.c index efe8c6be89..075fe9df0e 100644 --- a/src/las.c +++ b/src/las.c @@ -2,11 +2,11 @@ || 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: las.c,v 1.333 2003/03/27 02:19:01 mast Exp $ +|| $Id: las.c,v 1.334 2003/04/02 19:22:43 mast Exp $ */ #include "global.h" -RCSID("$Id: las.c,v 1.333 2003/03/27 02:19:01 mast Exp $"); +RCSID("$Id: las.c,v 1.334 2003/04/02 19:22:43 mast Exp $"); #include "language.h" #include "interpret.h" @@ -886,7 +886,7 @@ static int is_automap_arg_list(node *n) } -node *debug_mknode(short token, node *a, node *b) +node *debug_mknode(int token, node *a, node *b) { node *res; diff --git a/src/las.h b/src/las.h index 30d1f81693..c97d62b905 100644 --- a/src/las.h +++ b/src/las.h @@ -2,7 +2,7 @@ || 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: las.h,v 1.61 2003/03/27 02:05:12 mast Exp $ +|| $Id: las.h,v 1.62 2003/04/02 19:22:43 mast Exp $ */ #ifndef LAS_H @@ -125,7 +125,7 @@ struct node_chunk; void free_all_nodes(void); void debug_free_node(node *n); node *debug_check_node_hash(node *n); -node *debug_mknode(short token,node *a,node *b); +node *debug_mknode(int token,node *a,node *b); node *debug_mkstrnode(struct pike_string *str); node *debug_mkintnode(INT_TYPE nr); node *debug_mknewintnode(INT_TYPE nr); diff --git a/src/multiset.c b/src/multiset.c index 9d09b72baa..c9ea6643c5 100644 --- a/src/multiset.c +++ b/src/multiset.c @@ -2,7 +2,7 @@ || 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: multiset.c,v 1.70 2003/04/01 18:10:21 nilsson Exp $ +|| $Id: multiset.c,v 1.71 2003/04/02 19:22:43 mast Exp $ */ #include "global.h" @@ -14,7 +14,7 @@ * Created by Martin Stjernholm 2001-05-07 */ -RCSID("$Id: multiset.c,v 1.70 2003/04/01 18:10:21 nilsson Exp $"); +RCSID("$Id: multiset.c,v 1.71 2003/04/02 19:22:43 mast Exp $"); #include "builtin_functions.h" #include "gc.h" @@ -277,7 +277,7 @@ void free_multiset_data (struct multiset_data *msd); BLOCK_ALLOC_FILL_PAGES (multiset, 2) /* Note: The returned block has no refs. */ -static struct multiset_data *low_alloc_multiset_data (int allocsize, INT16 flags) +static struct multiset_data *low_alloc_multiset_data (int allocsize, int flags) { struct multiset_data *msd; @@ -598,8 +598,8 @@ static struct multiset_data *resize_multiset_data (struct multiset_data *old, new->refs = old->refs; new->noval_refs = old->noval_refs; - /* No longer contains any references to account for, thus a simple - * free. */ + /* All references have moved to the new block, so this one has thus + * become a simple block from the gc's perspective. */ GC_FREE_SIMPLE_BLOCK (old); xfree (old); @@ -5281,7 +5281,7 @@ void test_multiset (void) #include "gc.h" #include "security.h" -RCSID("$Id: multiset.c,v 1.70 2003/04/01 18:10:21 nilsson Exp $"); +RCSID("$Id: multiset.c,v 1.71 2003/04/02 19:22:43 mast Exp $"); struct multiset *first_multiset; diff --git a/src/pike_memory.c b/src/pike_memory.c index cc0a97b804..fbc878f6ef 100644 --- a/src/pike_memory.c +++ b/src/pike_memory.c @@ -2,7 +2,7 @@ || 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: pike_memory.c,v 1.144 2003/03/30 20:46:41 mast Exp $ +|| $Id: pike_memory.c,v 1.145 2003/04/02 19:22:43 mast Exp $ */ #include "global.h" @@ -11,7 +11,7 @@ #include "pike_macros.h" #include "gc.h" -RCSID("$Id: pike_memory.c,v 1.144 2003/03/30 20:46:41 mast Exp $"); +RCSID("$Id: pike_memory.c,v 1.145 2003/04/02 19:22:43 mast Exp $"); /* strdup() is used by several modules, so let's provide it */ #ifndef HAVE_STRDUP @@ -380,9 +380,9 @@ char *memory_search(struct mem_searcher *s, void init_generic_memsearcher(struct generic_mem_searcher *s, void *needle, size_t needlelen, - char needle_shift, + int needle_shift, size_t estimated_haystack, - char haystack_shift) + int haystack_shift) { s->needle_shift=needle_shift; s->haystack_shift=haystack_shift; @@ -424,7 +424,7 @@ void init_generic_memsearcher(struct generic_mem_searcher *s, void *generic_memory_search(struct generic_mem_searcher *s, void *haystack, size_t haystacklen, - char haystack_shift) + int haystack_shift) { if(s->needle_shift==0 && s->haystack_shift==0) { @@ -2037,16 +2037,16 @@ static void parse_location (struct memloc *l, struct parsed_location *pl) const char *p; pl->file = LOCATION_NAME (l->location); - p = strchr (pl->file, ' '); + p = STRCHR (pl->file, ' '); if (p) pl->extra = p; else - pl->extra = strchr (pl->file, 0); + pl->extra = STRCHR (pl->file, 0); - p = strchr (pl->file, ':'); + p = STRCHR (pl->file, ':'); if (p && p < pl->extra) { const char *pp; - while ((pp = strchr (p + 1, ':')) && pp < pl->extra) p = pp; + while ((pp = STRCHR (p + 1, ':')) && pp < pl->extra) p = pp; pl->line = atoi (p + 1); pl->file_len = p - pl->file; } diff --git a/src/pike_memory.h b/src/pike_memory.h index 1340434685..dd66815e57 100644 --- a/src/pike_memory.h +++ b/src/pike_memory.h @@ -2,7 +2,7 @@ || 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: pike_memory.h,v 1.43 2003/03/02 14:28:42 grubba Exp $ +|| $Id: pike_memory.h,v 1.44 2003/04/02 19:22:43 mast Exp $ */ #ifndef MEMORY_H @@ -146,13 +146,13 @@ PMOD_EXPORT char *memory_search(struct mem_searcher *s, PMOD_EXPORT void init_generic_memsearcher(struct generic_mem_searcher *s, void *needle, size_t needlelen, - char needle_shift, + int needle_shift, size_t estimated_haystack, - char haystack_shift); + int haystack_shift); PMOD_EXPORT void *generic_memory_search(struct generic_mem_searcher *s, void *haystack, size_t haystacklen, - char haystack_shift); + int haystack_shift); PMOD_EXPORT char *my_memmem(char *needle, size_t needlelen, char *haystack, diff --git a/src/pike_search.c b/src/pike_search.c index cc82deeb75..9b31011dc2 100644 --- a/src/pike_search.c +++ b/src/pike_search.c @@ -2,7 +2,7 @@ || 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: pike_search.c,v 1.13 2003/03/08 19:12:31 grubba Exp $ +|| $Id: pike_search.c,v 1.14 2003/04/02 19:22:43 mast Exp $ */ /* New memory searcher functions */ @@ -265,9 +265,9 @@ static void f_pike_search(INT32 args) PMOD_EXPORT void init_generic_memsearcher(struct generic_mem_searcher *s, void *needle, size_t needlelen, - char needle_shift, + int needle_shift, size_t estimated_haystack, - char haystack_shift) + int haystack_shift) { pike_init_memsearch(s, MKPCHARP(needle, needle_shift), @@ -278,7 +278,7 @@ PMOD_EXPORT void init_generic_memsearcher(struct generic_mem_searcher *s, void *generic_memory_search(struct generic_mem_searcher *s, void *haystack, size_t haystacklen, - char haystack_shift) + int haystack_shift) { return ( s->mojt.vtab->funcN(s->mojt.data, MKPCHARP(haystack, haystack_shift), diff --git a/src/pike_search.h b/src/pike_search.h index 8f1a200fd6..8c4a123aad 100644 --- a/src/pike_search.h +++ b/src/pike_search.h @@ -2,7 +2,7 @@ || 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: pike_search.h,v 1.6 2002/10/11 01:39:35 nilsson Exp $ +|| $Id: pike_search.h,v 1.7 2003/04/02 19:22:43 mast Exp $ */ #ifndef PIKE_SEARCH_H @@ -99,13 +99,13 @@ PMOD_EXPORT char *my_memmem(char *needle, PMOD_EXPORT void init_generic_memsearcher(struct generic_mem_searcher *s, void *needle, size_t needlelen, - char needle_shift, + int needle_shift, size_t estimated_haystack, - char haystack_shift); + int haystack_shift); PMOD_EXPORT void *generic_memory_search(struct generic_mem_searcher *s, void *haystack, size_t haystacklen, - char haystack_shift); + int haystack_shift); void init_pike_searching(void); void exit_pike_searching(void); /* Prototypes end here */ diff --git a/src/pike_types.c b/src/pike_types.c index 9847c632bb..dd948e65b9 100644 --- a/src/pike_types.c +++ b/src/pike_types.c @@ -2,11 +2,11 @@ || 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: pike_types.c,v 1.213 2003/03/29 13:47:52 marcus Exp $ +|| $Id: pike_types.c,v 1.214 2003/04/02 19:22:43 mast Exp $ */ #include "global.h" -RCSID("$Id: pike_types.c,v 1.213 2003/03/29 13:47:52 marcus Exp $"); +RCSID("$Id: pike_types.c,v 1.214 2003/04/02 19:22:43 mast Exp $"); #include <ctype.h> #include "svalue.h" #include "pike_types.h" @@ -607,7 +607,7 @@ void debug_push_finished_type(struct pike_type *t) TYPE_STACK_DEBUG("push_finished_type"); } -void debug_push_type(unsigned INT16 type) +void debug_push_type(unsigned int type) { /* fprintf(stderr, "push_type(%d)\n", type); */ @@ -677,7 +677,7 @@ void debug_push_type(unsigned INT16 type) } /* Pop one level of types. This is the inverse of push_type() */ -void debug_pop_type_stack(unsigned INT16 expected) +void debug_pop_type_stack(unsigned int expected) { struct pike_type *top; if(Pike_compiler->type_stackp<type_stack) @@ -754,7 +754,7 @@ void debug_pop_type_stack(unsigned INT16 expected) TYPE_STACK_DEBUG("pop_type_stack"); } -void debug_push_reverse_type(unsigned INT16 type) +void debug_push_reverse_type(unsigned int type) { /* fprintf(stderr, "push_reverse_type(%d)\n", type); */ diff --git a/src/pike_types.h b/src/pike_types.h index ec119d8a91..74ece38c6c 100644 --- a/src/pike_types.h +++ b/src/pike_types.h @@ -2,7 +2,7 @@ || 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: pike_types.h,v 1.85 2003/02/04 18:17:33 mast Exp $ +|| $Id: pike_types.h,v 1.86 2003/04/02 19:22:43 mast Exp $ */ #ifndef PIKE_TYPES_H @@ -190,8 +190,8 @@ extern struct pike_type_location *all_pike_type_locations; #define exit_type_stack pop_stack_mark #endif -void debug_push_type(unsigned INT16 type); -void debug_push_reverse_type(unsigned INT16 type); +void debug_push_type(unsigned int type); +void debug_push_reverse_type(unsigned int type); #ifdef DEBUG_MALLOC #define push_type(T) do { debug_push_type(T); debug_malloc_pass(debug_peek_type_stack()); } while(0) #define push_reverse_type(T) do { debug_push_reverse_type(T); debug_malloc_pass(debug_peek_type_stack()); } while(0) @@ -219,7 +219,7 @@ void debug_push_reverse_type(unsigned INT16 type); void debug_check_type_string(struct pike_type *s); void init_types(void); ptrdiff_t pop_stack_mark(void); -void debug_pop_type_stack(unsigned INT16 expected); +void debug_pop_type_stack(unsigned int expected); void type_stack_pop_to_mark(void); void type_stack_reverse(void); struct pike_type *debug_peek_type_stack(void); diff --git a/src/port.h b/src/port.h index 18feb60790..63644cd5a0 100644 --- a/src/port.h +++ b/src/port.h @@ -2,7 +2,7 @@ || 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: port.h,v 1.49 2003/03/28 13:38:47 marcus Exp $ +|| $Id: port.h,v 1.50 2003/04/02 19:22:43 mast Exp $ */ #ifndef PORT_H @@ -131,12 +131,12 @@ PMOD_EXPORT void *MEMCHR(void *p,char c,size_t e); # ifdef HAVE_INDEX # define STRCHR(X,Y) ((char *)index(X,Y)) # else -PMOD_EXPORT char *STRCHR(char *s,char c); +PMOD_EXPORT char *STRCHR(char *s,int c); # endif #else # define STRCHR strchr # ifdef STRCHR_DECL_MISSING -char *STRCHR(char *s,char c); +char *STRCHR(char *s,int c); # endif #endif @@ -201,14 +201,14 @@ PMOD_EXPORT unsigned INT16 EXTRACT_UWORD_(unsigned char *p); PMOD_EXPORT INT16 EXTRACT_WORD_(unsigned char *p); PMOD_EXPORT INT32 EXTRACT_INT_(unsigned char *p); #else -static INLINE unsigned INT16 EXTRACT_UWORD_(unsigned char *p) +static INLINE unsigned EXTRACT_UWORD_(unsigned char *p) { unsigned INT16 a; MEMCPY((char *)&a,p,sizeof(a)); return a; } -static INLINE INT16 EXTRACT_WORD_(unsigned char *p) +static INLINE int EXTRACT_WORD_(unsigned char *p) { INT16 a; MEMCPY((char *)&a,p,sizeof(a)); diff --git a/src/program.c b/src/program.c index ce9689e1da..cfa599f6af 100644 --- a/src/program.c +++ b/src/program.c @@ -2,11 +2,11 @@ || 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: program.c,v 1.496 2003/04/01 18:11:09 nilsson Exp $ +|| $Id: program.c,v 1.497 2003/04/02 19:22:44 mast Exp $ */ #include "global.h" -RCSID("$Id: program.c,v 1.496 2003/04/01 18:11:09 nilsson Exp $"); +RCSID("$Id: program.c,v 1.497 2003/04/02 19:22:44 mast Exp $"); #include "program.h" #include "object.h" #include "dynamic_buffer.h" @@ -928,7 +928,7 @@ int get_small_number(char **q); #define RELOCATE_constants(ORIG,NEW) #define RELOCATE_relocations(ORIG,NEW) -#define FOO(NUMTYPE,TYPE,NAME) \ +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ void PIKE_CONCAT(low_add_to_,NAME) (struct program_state *state, \ TYPE ARG) { \ if(state->malloc_size_program->PIKE_CONCAT(num_,NAME) == \ @@ -947,7 +947,7 @@ void PIKE_CONCAT(low_add_to_,NAME) (struct program_state *state, \ state->new_program-> \ NAME[state->new_program->PIKE_CONCAT(num_,NAME)++]=(ARG); \ } \ -void PIKE_CONCAT(add_to_,NAME) (TYPE ARG) { \ +void PIKE_CONCAT(add_to_,NAME) (ARGTYPE ARG) { \ CHECK_FOO(NUMTYPE,TYPE,NAME); \ PIKE_CONCAT(low_add_to_,NAME) ( Pike_compiler, ARG ); \ } @@ -970,7 +970,7 @@ void ins_int(INT32 i, void (*func)(char tmp)) } } -void ins_short(INT16 i, void (*func)(char tmp)) +void ins_short(int i, void (*func)(char tmp)) { int e; unsigned char *p = (unsigned char *)&i; @@ -1443,7 +1443,7 @@ void optimize_program(struct program *p) /* Already done (shouldn't happen, but who knows?) */ if(p->flags & PROGRAM_OPTIMIZED) return; -#define FOO(NUMTYPE,TYPE,NAME) \ +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ size=DO_ALIGN(size, ALIGNOF(TYPE)); \ size+=p->PIKE_CONCAT(num_,NAME)*sizeof(p->NAME[0]); #include "program_areas.h" @@ -1457,7 +1457,7 @@ void optimize_program(struct program *p) size=0; -#define FOO(NUMTYPE,TYPE,NAME) \ +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ size=DO_ALIGN(size, ALIGNOF(TYPE)); \ MEMCPY(data+size,p->NAME,p->PIKE_CONCAT(num_,NAME)*sizeof(p->NAME[0])); \ PIKE_CONCAT(RELOCATE_,NAME)(p, (TYPE *)(data+size)); \ @@ -1505,10 +1505,10 @@ struct pike_string *find_program_name(struct program *p, INT32 *line) { char *tmp=dmalloc_find_name(p); if (tmp) { - char *p = strchr (tmp, ':'); + char *p = STRCHR (tmp, ':'); if (p) { char *pp; - while ((pp = strchr (p + 1, ':'))) p = pp; + while ((pp = STRCHR (p + 1, ':'))) p = pp; *line = atoi (p + 1); return make_shared_binary_string (tmp, p - tmp); } @@ -1928,7 +1928,7 @@ void low_start_new_program(struct program *p, if(Pike_compiler->new_program->program) { -#define FOO(NUMTYPE,TYPE,NAME) \ +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ Pike_compiler->malloc_size_program->PIKE_CONCAT(num_,NAME)=Pike_compiler->new_program->PIKE_CONCAT(num_,NAME); #include "program_areas.h" @@ -1971,7 +1971,7 @@ void low_start_new_program(struct program *p, struct inherit i; #define START_SIZE 64 -#define FOO(NUMTYPE,TYPE,NAME) \ +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ if (Pike_compiler->new_program->NAME) { \ free (Pike_compiler->new_program->NAME); \ Pike_compiler->new_program->PIKE_CONCAT(num_,NAME) = 0; \ @@ -2034,7 +2034,7 @@ PMOD_EXPORT void debug_start_new_program(int line, const char *file) static void exit_program_struct(struct program *p) { - unsigned INT16 e; + unsigned e; #ifdef PIKE_DEBUG if (p->refs) { @@ -2109,10 +2109,10 @@ static void exit_program_struct(struct program *p) #endif /* PIKE_USE_MACHINE_CODE */ dmfree(p->program); } -#define FOO(NUMTYPE,TYPE,NAME) p->NAME=0; +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) p->NAME=0; #include "program_areas.h" }else{ -#define FOO(NUMTYPE,TYPE,NAME) \ +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ if(p->NAME) { dmfree((char *)p->NAME); p->NAME=0; } #include "program_areas.h" } @@ -4191,7 +4191,7 @@ PMOD_EXPORT int add_object_constant(const char *name, } PMOD_EXPORT int add_function_constant(const char *name, void (*cfun)(INT32), - const char * type, INT16 flags) + const char * type, int flags) { struct svalue s; INT32 ret; @@ -4230,10 +4230,10 @@ PMOD_EXPORT int debug_end_class(const char *name, ptrdiff_t namelen, INT32 flags */ INT32 define_function(struct pike_string *name, struct pike_type *type, - unsigned INT16 flags, - unsigned INT8 function_flags, + unsigned flags, + unsigned function_flags, union idptr *func, - unsigned INT16 opt_flags) + unsigned opt_flags) { struct identifier *funp,fun; struct reference ref; @@ -6209,8 +6209,8 @@ struct program *compile(struct pike_string *aprog, } PMOD_EXPORT int pike_add_function2(const char *name, void (*cfun)(INT32), - const char *type, unsigned INT8 flags, - unsigned INT16 opt_flags) + const char *type, unsigned flags, + unsigned opt_flags) { int ret; struct pike_string *name_tmp; @@ -6247,8 +6247,8 @@ PMOD_EXPORT int quick_add_function(const char *name, void (*cfun)(INT32), const char *type, int type_length, - unsigned INT8 flags, - unsigned INT16 opt_flags) + unsigned flags, + unsigned opt_flags) { int ret; struct pike_string *name_tmp; diff --git a/src/program.h b/src/program.h index 612558ef5f..a2094deab9 100644 --- a/src/program.h +++ b/src/program.h @@ -2,7 +2,7 @@ || 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: program.h,v 1.180 2003/03/29 22:42:48 mast Exp $ +|| $Id: program.h,v 1.181 2003/04/02 19:22:44 mast Exp $ */ #ifndef PROGRAM_H @@ -378,10 +378,10 @@ struct program size_t total_size; -#define FOO(NUMTYPE,TYPE,NAME) TYPE * NAME ; +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) TYPE * NAME ; #include "program_areas.h" -#define FOO(NUMTYPE,TYPE,NAME) NUMTYPE PIKE_CONCAT(num_,NAME) ; +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) NUMTYPE PIKE_CONCAT(num_,NAME) ; #include "program_areas.h" INT16 lfuns[NUM_LFUNS]; @@ -424,7 +424,7 @@ extern int compilation_depth; #define ADD_STORAGE(X) low_add_storage(sizeof(X), ALIGNOF(X),0) #define STORAGE_NEEDED(X) ((X)->storage_needed - (X)->inherits[0].storage_offset) -#define FOO(NUMTYPE,TYPE,NAME) void PIKE_CONCAT(add_to_,NAME(TYPE ARG)); +#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) void PIKE_CONCAT(add_to_,NAME(ARGTYPE ARG)); #include "program_areas.h" /* This flag is set when resolve functions should force the lookup so @@ -450,7 +450,7 @@ struct Supporter /* Prototypes begin here */ void ins_int(INT32 i, void (*func)(char tmp)); -void ins_short(INT16 i, void (*func)(char tmp)); +void ins_short(int i, void (*func)(char tmp)); void add_relocated_int_to_program(INT32 i); void use_module(struct svalue *s); void unuse_modules(INT32 howmany); @@ -563,14 +563,14 @@ PMOD_EXPORT int add_program_constant(const char *name, PMOD_EXPORT int add_object_constant(const char *name, struct object *o, INT32 flags); -PMOD_EXPORT int add_function_constant(const char *name, void (*cfun)(INT32), const char * type, INT16 flags); +PMOD_EXPORT int add_function_constant(const char *name, void (*cfun)(INT32), const char * type, int flags); PMOD_EXPORT int debug_end_class(const char *name, ptrdiff_t namelen, INT32 flags); INT32 define_function(struct pike_string *name, struct pike_type *type, - unsigned INT16 flags, - unsigned INT8 function_flags, + unsigned flags, + unsigned function_flags, union idptr *func, - unsigned INT16 opt_flags); + unsigned opt_flags); int really_low_find_shared_string_identifier(struct pike_string *name, struct program *prog, int flags); @@ -626,15 +626,15 @@ struct program *compile(struct pike_string *aprog, struct program *atarget, struct object *aplaceholder); PMOD_EXPORT int pike_add_function2(const char *name, void (*cfun)(INT32), - const char *type, unsigned INT8 flags, - unsigned INT16 opt_flags); + const char *type, unsigned flags, + unsigned opt_flags); PMOD_EXPORT int quick_add_function(const char *name, int name_length, void (*cfun)(INT32), const char *type, int type_length, - unsigned INT8 flags, - unsigned INT16 opt_flags); + unsigned flags, + unsigned opt_flags); void check_all_programs(void); void placeholder_index(INT32 args); void init_program(void); diff --git a/src/program_areas.h b/src/program_areas.h index 28ec44cf0e..54f91261f1 100644 --- a/src/program_areas.h +++ b/src/program_areas.h @@ -2,20 +2,20 @@ || 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: program_areas.h,v 1.12 2002/10/11 01:39:37 nilsson Exp $ +|| $Id: program_areas.h,v 1.13 2003/04/02 19:22:44 mast Exp $ */ /* Who needs templates anyway? / Hubbe */ /* Program *must* be first! */ -FOO(size_t,PIKE_OPCODE_T,program) -FOO(size_t,size_t,relocations) -FOO(size_t,char,linenumbers) -FOO(unsigned INT16,unsigned INT16,identifier_index) -FOO(unsigned INT16,unsigned INT16,variable_index) -FOO(unsigned INT16,struct reference,identifier_references) -FOO(unsigned INT16,struct pike_string *,strings) -FOO(unsigned INT16,struct inherit,inherits) -FOO(unsigned INT16,struct identifier,identifiers) -FOO(unsigned INT16,struct program_constant, constants) +FOO(size_t,PIKE_OPCODE_T, PIKE_OPCODE_T, program) +FOO(size_t,size_t, size_t, relocations) +FOO(size_t,char, int, linenumbers) +FOO(unsigned INT16,unsigned INT16, unsigned, identifier_index) +FOO(unsigned INT16,unsigned INT16, unsigned, variable_index) +FOO(unsigned INT16,struct reference, struct reference, identifier_references) +FOO(unsigned INT16,struct pike_string *, struct pike_string *, strings) +FOO(unsigned INT16,struct inherit, struct inherit, inherits) +FOO(unsigned INT16,struct identifier, struct identifier, identifiers) +FOO(unsigned INT16,struct program_constant, struct program_constant, constants) #undef FOO diff --git a/src/rbtree.h b/src/rbtree.h index 26b38649a9..43da4e7779 100644 --- a/src/rbtree.h +++ b/src/rbtree.h @@ -2,7 +2,7 @@ || 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: rbtree.h,v 1.9 2002/12/22 17:18:55 mast Exp $ +|| $Id: rbtree.h,v 1.10 2003/04/02 19:22:44 mast Exp $ */ /* An implementation of a threaded red/black balanced binary tree. @@ -68,7 +68,7 @@ struct rb_node_hdr */ #define keep_flags(node, code) do { \ - INT16 kept_flags_ = (node)->flags; \ + int kept_flags_ = (node)->flags; \ {code;} \ (node)->flags = \ ((node)->flags & ~RB_FLAG_MASK) | (kept_flags_ & RB_FLAG_MASK); \ diff --git a/src/svalue.h b/src/svalue.h index 4d6d536268..7ddb21d123 100644 --- a/src/svalue.h +++ b/src/svalue.h @@ -2,7 +2,7 @@ || 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: svalue.h,v 1.117 2003/03/14 15:43:22 grubba Exp $ +|| $Id: svalue.h,v 1.118 2003/04/02 19:22:44 mast Exp $ */ #ifndef SVALUE_H @@ -655,7 +655,7 @@ static inline void free_svalue(struct svalue *s) #endif #ifndef free_short_svalue -static inline void free_short_svalue(union anything *s, INT16 t) +static inline void free_short_svalue(union anything *s, int t) { if(t <= MAX_REF_TYPE) { -- GitLab