cvs: ZendEngine2 / zend.h zend_API.c zend_API.h zend_builtin_functions.c zend_compile.c zend_compile.h zend_execute.c zend_execute.h
zend_execute_API.c zend_hash.c zend_hash.h zend_opcode.c zend_operators.c zend_operators.h zend_ts_hash.c zend_ts_hash.h
| From: | Harald Radi | Date: | Tue, 23 Apr 2002 18:06:55 +0000 |
| Subject: | cvs: ZendEngine2 / zend.h zend_API.c zend_API.h zend_builtin_functions.c zend_compile.c zend_compile.h zend_execute.c zend_execute.h zend_execute_API.c zend_hash.c zend_hash.h zend_opcode.c zend_operators.c zend_operators.h zend_ts_hash.c zend_ts_hash.h |
||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-68@lists.php.net to get a copy of this message | ||
phanto Tue Apr 23 14:06:55 2002 EDT
Modified files:
/ZendEngine2 zend.h zend_API.c zend_API.h zend_builtin_functions.c
zend_compile.c zend_compile.h zend_execute.c
zend_execute.h zend_execute_API.c zend_hash.c
zend_hash.h zend_opcode.c zend_operators.c
zend_operators.h zend_ts_hash.c zend_ts_hash.h
Log:
some type cleanup work
Index: ZendEngine2/zend.h diff -u ZendEngine2/zend.h:1.168 ZendEngine2/zend.h:1.169 --- ZendEngine2/zend.h:1.168 Sun Apr 7 13:12:38 2002 +++ ZendEngine2/zend.h Tue Apr 23 14:06:50 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.h,v 1.168 2002/04/07 17:12:38 stas Exp $ */ +/* $Id: zend.h,v 1.169 2002/04/23 18:06:50 phanto Exp $ */ #ifndef ZEND_H #define ZEND_H @@ -221,7 +221,7 @@ double dval; /* double value */ struct { char *val; - int len; + zend_uint len; } str; HashTable *ht; /* hash table value */ /* struct { @@ -272,7 +272,7 @@ struct _zend_class_entry { char type; char *name; - uint name_length; + zend_uint name_length; struct _zend_class_entry *parent; int refcount; zend_bool constants_updated; Index: ZendEngine2/zend_API.c diff -u ZendEngine2/zend_API.c:1.125 ZendEngine2/zend_API.c:1.126 --- ZendEngine2/zend_API.c:1.125 Mon Apr 22 10:22:26 2002 +++ ZendEngine2/zend_API.c Tue Apr 23 14:06:52 2002 @@ -1272,7 +1272,7 @@ } ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length, - int is_ref, int num_symbol_tables, ...) + zend_bool is_ref, int num_symbol_tables, ...) { HashTable *symbol_table; va_list symbol_table_list; @@ -1320,7 +1320,7 @@ zend_bool zend_is_callable(zval *callable, zend_bool syntax_only, char **callable_name) { char *lcname; - int retval = 0; + zend_bool retval = 0; TSRMLS_FETCH(); switch (Z_TYPE_P(callable)) { @@ -1343,7 +1343,7 @@ zval **method; zval **obj; zend_class_entry *ce = NULL, **pce; - char callable_name_len; + zend_uint callable_name_len; if (zend_hash_num_elements(Z_ARRVAL_P(callable)) == 2 && zend_hash_index_find(Z_ARRVAL_P(callable), 0, (void **) &obj) == SUCCESS && Index: ZendEngine2/zend_API.h diff -u ZendEngine2/zend_API.h:1.115 ZendEngine2/zend_API.h:1.116 --- ZendEngine2/zend_API.h:1.115 Mon Apr 22 10:22:26 2002 +++ ZendEngine2/zend_API.h Tue Apr 23 14:06:52 2002 @@ -252,7 +252,7 @@ ZEND_API int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table TSRMLS_DC); ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length, - int is_ref, int num_symbol_tables, ...); + zend_bool is_ref, int num_symbol_tables, ...); #define add_method(arg, key, method) add_assoc_function((arg), (key), (method)) Index: ZendEngine2/zend_builtin_functions.c diff -u ZendEngine2/zend_builtin_functions.c:1.116 ZendEngine2/zend_builtin_functions.c:1.117 --- ZendEngine2/zend_builtin_functions.c:1.116 Mon Apr 22 10:22:26 2002 +++ ZendEngine2/zend_builtin_functions.c Tue Apr 23 14:06:53 2002 @@ -492,7 +492,7 @@ { zval **arg; char *name; - int name_len; + zend_uint name_len; if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) { ZEND_WRONG_PARAM_COUNT(); Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.284 ZendEngine2/zend_compile.c:1.285 --- ZendEngine2/zend_compile.c:1.284 Sun Apr 7 11:38:45 2002 +++ ZendEngine2/zend_compile.c Tue Apr 23 14:06:53 2002 @@ -156,7 +156,7 @@ } -void zend_do_binary_op(int op, znode *result, znode *op1, znode *op2 TSRMLS_DC) +void zend_do_binary_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC) { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -169,7 +169,7 @@ } -void zend_do_unary_op(int op, znode *result, znode *op1 TSRMLS_DC) +void zend_do_unary_op(zend_uchar op, znode *result, znode *op1 TSRMLS_DC) { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -200,7 +200,7 @@ } } -void zend_do_binary_assign_op(int op, znode *result, znode *op1, znode *op2 TSRMLS_DC) +void zend_do_binary_assign_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC) { int last_op_number = get_next_op_number(CG(active_op_array))-1; zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number]; @@ -264,7 +264,7 @@ } -void fetch_simple_variable_ex(znode *result, znode *varname, int bp, int op TSRMLS_DC) +void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar op TSRMLS_DC) { zend_op opline; zend_op *opline_ptr; @@ -518,7 +518,7 @@ } -void zend_do_pre_incdec(znode *result, znode *op1, int op TSRMLS_DC) +void zend_do_pre_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC) { int last_op_number = get_next_op_number(CG(active_op_array))-1; zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number]; @@ -543,7 +543,7 @@ } -void zend_do_post_incdec(znode *result, znode *op1, int op TSRMLS_DC) +void zend_do_post_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC) { int last_op_number = get_next_op_number(CG(active_op_array))-1; zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number]; @@ -990,7 +990,7 @@ } -void zend_do_receive_arg(int op, znode *var, znode *offset, znode *initialization, unsigned char pass_type TSRMLS_DC) +void zend_do_receive_arg(zend_uchar op, znode *var, znode *offset, znode *initialization, zend_uchar pass_type TSRMLS_DC) { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -1224,7 +1224,7 @@ } -void zend_do_pass_param(znode *param, int op, int offset TSRMLS_DC) +void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC) { zend_op *opline; unsigned char *arg_types; @@ -1828,7 +1828,7 @@ } -void zend_do_brk_cont(int op, znode *expr TSRMLS_DC) +void zend_do_brk_cont(zend_uchar op, znode *expr TSRMLS_DC) { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -2363,7 +2363,7 @@ -void zend_do_init_array(znode *result, znode *expr, znode *offset, int is_ref TSRMLS_DC) +void zend_do_init_array(znode *result, znode *expr, znode *offset, zend_bool is_ref TSRMLS_DC) { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -2386,7 +2386,7 @@ } -void zend_do_add_array_element(znode *result, znode *expr, znode *offset, int is_ref TSRMLS_DC) +void zend_do_add_array_element(znode *result, znode *expr, znode *offset, zend_bool is_ref TSRMLS_DC) { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); Index: ZendEngine2/zend_compile.h diff -u ZendEngine2/zend_compile.h:1.173 ZendEngine2/zend_compile.h:1.174 --- ZendEngine2/zend_compile.h:1.173 Fri Mar 15 10:09:44 2002 +++ ZendEngine2/zend_compile.h Tue Apr 23 14:06:53 2002 @@ -223,13 +223,13 @@ /* parser-driven code generators */ -void zend_do_binary_op(int op, znode *result, znode *op1, znode *op2 TSRMLS_DC); -void zend_do_unary_op(int op, znode *result, znode *op1 TSRMLS_DC); -void zend_do_binary_assign_op(int op, znode *result, znode *op1, znode *op2 TSRMLS_DC); +void zend_do_binary_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC); +void zend_do_unary_op(zend_uchar op, znode *result, znode *op1 TSRMLS_DC); +void zend_do_binary_assign_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC); void zend_do_assign(znode *result, znode *variable, znode *value TSRMLS_DC); void zend_do_assign_ref(znode *result, znode *lvar, znode *rvar TSRMLS_DC); void fetch_simple_variable(znode *result, znode *varname, int bp TSRMLS_DC); -void fetch_simple_variable_ex(znode *result, znode *varname, int bp, int op TSRMLS_DC); +void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar op TSRMLS_DC); void zend_do_indirect_references(znode *result, znode *num_references, znode *variable TSRMLS_DC); void zend_do_fetch_global_or_static_variable(znode *varname, znode *static_assignment, int fetch_type TSRMLS_DC); @@ -257,8 +257,8 @@ void zend_do_for_before_statement(znode *cond_start, znode *second_semicolon_token TSRMLS_DC); void zend_do_for_end(znode *second_semicolon_token TSRMLS_DC); -void zend_do_pre_incdec(znode *result, znode *op1, int op TSRMLS_DC); -void zend_do_post_incdec(znode *result, znode *op1, int op TSRMLS_DC); +void zend_do_pre_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC); +void zend_do_post_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC); void zend_do_begin_variable_parse(TSRMLS_D); void zend_do_end_variable_parse(int type, int arg_offset TSRMLS_DC); @@ -274,7 +274,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference TSRMLS_DC); void zend_do_end_function_declaration(znode *function_token TSRMLS_DC); -void zend_do_receive_arg(int op, znode *var, znode *offset, znode *initialization, unsigned char pass_type TSRMLS_DC); +void zend_do_receive_arg(zend_uchar op, znode *var, znode *offset, znode *initialization, zend_uchar pass_type TSRMLS_DC); int zend_do_begin_function_call(znode *function_name TSRMLS_DC); void zend_do_begin_method_call(znode *left_bracket TSRMLS_DC); void zend_do_begin_dynamic_function_call(znode *function_name TSRMLS_DC); @@ -293,7 +293,7 @@ void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce); void zend_do_early_binding(TSRMLS_D); -void zend_do_pass_param(znode *param, int op, int offset TSRMLS_DC); +void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC); void zend_do_boolean_or_begin(znode *expr1, znode *op_token TSRMLS_DC); @@ -301,7 +301,7 @@ void zend_do_boolean_and_begin(znode *expr1, znode *op_token TSRMLS_DC); void zend_do_boolean_and_end(znode *result, znode *expr1, znode *expr2, znode *op_token TSRMLS_DC); -void zend_do_brk_cont(int op, znode *expr TSRMLS_DC); +void zend_do_brk_cont(zend_uchar op, znode *expr TSRMLS_DC); void zend_do_switch_cond(znode *cond TSRMLS_DC); void zend_do_switch_end(znode *case_list TSRMLS_DC); @@ -327,8 +327,8 @@ void zend_do_shell_exec(znode *result, znode *cmd TSRMLS_DC); -void zend_do_init_array(znode *result, znode *expr, znode *offset, int is_ref TSRMLS_DC); -void zend_do_add_array_element(znode *result, znode *expr, znode *offset, int is_ref TSRMLS_DC); +void zend_do_init_array(znode *result, znode *expr, znode *offset, zend_bool is_ref TSRMLS_DC); +void zend_do_add_array_element(znode *result, znode *expr, znode *offset, zend_bool is_ref TSRMLS_DC); void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr); void zend_do_list_init(TSRMLS_D); void zend_do_list_end(znode *result, znode *expr TSRMLS_DC); @@ -382,7 +382,7 @@ ZEND_API zend_op_array *compile_filename(int type, zval *filename TSRMLS_DC); ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_count, ...); ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC); -ZEND_API void init_op_array(zend_op_array *op_array, int type, int initial_ops_size TSRMLS_DC); +ZEND_API void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size TSRMLS_DC); ZEND_API void destroy_op_array(zend_op_array *op_array); ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC); ZEND_API void zend_file_handle_dtor(zend_file_handle *fh); Index: ZendEngine2/zend_execute.c diff -u ZendEngine2/zend_execute.c:1.337 ZendEngine2/zend_execute.c:1.338 --- ZendEngine2/zend_execute.c:1.337 Fri Mar 15 11:26:17 2002 +++ ZendEngine2/zend_execute.c Tue Apr 23 14:06:53 2002 @@ -427,7 +427,7 @@ break; } if (T->EA.data.str_offset.offset >= T->EA.data.str_offset.str->value.str.len) { - int i; + zend_uint i; if (T->EA.data.str_offset.str->value.str.len==0) { STR_FREE(T->EA.data.str_offset.str->value.str.val); @@ -493,7 +493,7 @@ if (PZVAL_IS_REF(variable_ptr)) { if (variable_ptr!=value) { - short refcount=variable_ptr->refcount; + zend_uint refcount = variable_ptr->refcount; zval garbage; if (type!=IS_TMP_VAR) { @@ -1814,7 +1814,7 @@ zval *class_name; zend_bool is_const; char *class_name_strval; - int class_name_strlen; + zend_uint class_name_strlen; if (EX(opline)->extended_value == ZEND_FETCH_CLASS_SELF) { if (!EG(scope)) { Index: ZendEngine2/zend_execute.h diff -u ZendEngine2/zend_execute.h:1.44 ZendEngine2/zend_execute.h:1.45 --- ZendEngine2/zend_execute.h:1.44 Thu Feb 7 09:08:43 2002 +++ ZendEngine2/zend_execute.h Tue Apr 23 14:06:53 2002 @@ -38,7 +38,7 @@ union { struct { zval *str; - int offset; + zend_uint offset; } str_offset; zend_property_reference overloaded_element; } data; Index: ZendEngine2/zend_execute_API.c diff -u ZendEngine2/zend_execute_API.c:1.160 ZendEngine2/zend_execute_API.c:1.161 --- ZendEngine2/zend_execute_API.c:1.160 Sat Apr 20 16:14:14 2002 +++ ZendEngine2/zend_execute_API.c Tue Apr 23 14:06:53 2002 @@ -642,7 +642,7 @@ zend_op_array *new_op_array; zend_op_array *original_active_op_array = EG(active_op_array); zend_function_state *original_function_state_ptr = EG(function_state_ptr); - int original_handle_op_arrays; + zend_uchar original_handle_op_arrays; int retval; if (retval_ptr) { Index: ZendEngine2/zend_hash.c diff -u ZendEngine2/zend_hash.c:1.85 ZendEngine2/zend_hash.c:1.86 --- ZendEngine2/zend_hash.c:1.85 Fri Apr 19 12:53:35 2002 +++ ZendEngine2/zend_hash.c Tue Apr 23 14:06:54 2002 @@ -161,7 +161,7 @@ } -ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent) +ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent) { uint i = 3; @@ -194,7 +194,7 @@ } -ZEND_API int zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent, zend_bool bApplyProtection) +ZEND_API int zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection) { int retval = zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent); Index: ZendEngine2/zend_hash.h diff -u ZendEngine2/zend_hash.h:1.56 ZendEngine2/zend_hash.h:1.57 --- ZendEngine2/zend_hash.h:1.56 Fri Apr 19 12:53:35 2002 +++ ZendEngine2/zend_hash.h Tue Apr 23 14:06:54 2002 @@ -76,8 +76,8 @@ BEGIN_EXTERN_C() /* startup/shutdown */ -ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent); -ZEND_API int zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent, zend_bool bApplyProtection); +ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent); +ZEND_API int zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection); ZEND_API void zend_hash_destroy(HashTable *ht); ZEND_API void zend_hash_clean(HashTable *ht); Index: ZendEngine2/zend_opcode.c diff -u ZendEngine2/zend_opcode.c:1.70 ZendEngine2/zend_opcode.c:1.71 --- ZendEngine2/zend_opcode.c:1.70 Fri Mar 15 10:09:46 2002 +++ ZendEngine2/zend_opcode.c Tue Apr 23 14:06:54 2002 @@ -50,7 +50,7 @@ -void init_op_array(zend_op_array *op_array, int type, int initial_ops_size TSRMLS_DC) +void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size TSRMLS_DC) { op_array->type = type; Index: ZendEngine2/zend_operators.c diff -u ZendEngine2/zend_operators.c:1.120 ZendEngine2/zend_operators.c:1.121 --- ZendEngine2/zend_operators.c:1.120 Tue Mar 12 14:22:29 2002 +++ ZendEngine2/zend_operators.c Tue Apr 23 14:06:54 2002 @@ -839,7 +839,7 @@ return SUCCESS; } if (op1->type == IS_STRING) { - int i; + zend_uint i; result->type = IS_STRING; result->value.str.val = estrndup(op1->value.str.val, op1->value.str.len); @@ -861,7 +861,7 @@ if (op1->type == IS_STRING && op2->type == IS_STRING) { zval *longer, *shorter; char *result_str; - int i, result_len; + zend_uint i, result_len; if (op1->value.str.len >= op2->value.str.len) { longer = op1; @@ -900,7 +900,7 @@ if (op1->type == IS_STRING && op2->type == IS_STRING) { zval *longer, *shorter; char *result_str; - int i, result_len; + zend_uint i, result_len; if (op1->value.str.len >= op2->value.str.len) { longer = op1; @@ -941,7 +941,7 @@ if (op1->type == IS_STRING && op2->type == IS_STRING) { zval *longer, *shorter; char *result_str; - int i, result_len; + zend_uint i, result_len; if (op1->value.str.len >= op2->value.str.len) { longer = op1; Index: ZendEngine2/zend_operators.h diff -u ZendEngine2/zend_operators.h:1.54 ZendEngine2/zend_operators.h:1.55 --- ZendEngine2/zend_operators.h:1.54 Mon Apr 22 10:22:27 2002 +++ ZendEngine2/zend_operators.h Tue Apr 23 14:06:54 2002 @@ -58,7 +58,7 @@ ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); -static inline int is_numeric_string(char *str, int length, long *lval, double *dval, zend_bool allow_errors) +static inline zend_bool is_numeric_string(char *str, int length, long *lval, double *dval, zend_bool allow_errors) { long local_lval; double local_dval; Index: ZendEngine2/zend_ts_hash.c diff -u ZendEngine2/zend_ts_hash.c:1.2 ZendEngine2/zend_ts_hash.c:1.3 --- ZendEngine2/zend_ts_hash.c:1.2 Sat Mar 23 07:18:50 2002 +++ ZendEngine2/zend_ts_hash.c Tue Apr 23 14:06:54 2002 @@ -50,7 +50,7 @@ } /* delegates */ -ZEND_API int zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent) +ZEND_API int zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent) { ht->mx_reader = tsrm_mutex_alloc(); ht->mx_writer = tsrm_mutex_alloc(); @@ -58,7 +58,7 @@ return zend_hash_init(&(ht->hash), nSize, pHashFunction, pDestructor, persistent); } -ZEND_API int zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent, zend_bool bApplyProtection) +ZEND_API int zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection) { ht->mx_reader = tsrm_mutex_alloc(); ht->mx_writer = tsrm_mutex_alloc(); Index: ZendEngine2/zend_ts_hash.h diff -u ZendEngine2/zend_ts_hash.h:1.2 ZendEngine2/zend_ts_hash.h:1.3 --- ZendEngine2/zend_ts_hash.h:1.2 Sat Mar 23 07:18:50 2002 +++ ZendEngine2/zend_ts_hash.h Tue Apr 23 14:06:54 2002 @@ -33,8 +33,8 @@ BEGIN_EXTERN_C() /* startup/shutdown */ -ZEND_API int zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent); -ZEND_API int zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent, zend_bool bApplyProtection); +ZEND_API int zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent); +ZEND_API int zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection); ZEND_API void zend_ts_hash_destroy(TsHashTable *ht); ZEND_API void zend_ts_hash_clean(TsHashTable *ht);
Index: ZendEngine2/zend.h diff -u ZendEngine2/zend.h:1.168 ZendEngine2/zend.h:1.169 --- ZendEngine2/zend.h:1.168 Sun Apr 7 13:12:38 2002 +++ ZendEngine2/zend.h Tue Apr 23 14:06:50 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.h,v 1.168 2002/04/07 17:12:38 stas Exp $ */ +/* $Id: zend.h,v 1.169 2002/04/23 18:06:50 phanto Exp $ */ #ifndef ZEND_H #define ZEND_H @@ -221,7 +221,7 @@ double dval; /* double value */ struct { char *val; - int len; + zend_uint len; } str; HashTable *ht; /* hash table value */ /* struct { @@ -272,7 +272,7 @@ struct _zend_class_entry { char type; char *name; - uint name_length; + zend_uint name_length; struct _zend_class_entry *parent; int refcount; zend_bool constants_updated; Index: ZendEngine2/zend_API.c diff -u ZendEngine2/zend_API.c:1.125 ZendEngine2/zend_API.c:1.126 --- ZendEngine2/zend_API.c:1.125 Mon Apr 22 10:22:26 2002 +++ ZendEngine2/zend_API.c Tue Apr 23 14:06:52 2002 @@ -1272,7 +1272,7 @@ } ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length, - int is_ref, int num_symbol_tables, ...) + zend_bool is_ref, int num_symbol_tables, ...) { HashTable *symbol_table; va_list symbol_table_list; @@ -1320,7 +1320,7 @@ zend_bool zend_is_callable(zval *callable, zend_bool syntax_only, char **callable_name) { char *lcname; - int retval = 0; + zend_bool retval = 0; TSRMLS_FETCH(); switch (Z_TYPE_P(callable)) { @@ -1343,7 +1343,7 @@ zval **method; zval **obj; zend_class_entry *ce = NULL, **pce; - char callable_name_len; + zend_uint callable_name_len; if (zend_hash_num_elements(Z_ARRVAL_P(callable)) == 2 && zend_hash_index_find(Z_ARRVAL_P(callable), 0, (void **) &obj) == SUCCESS && Index: ZendEngine2/zend_API.h diff -u ZendEngine2/zend_API.h:1.115 ZendEngine2/zend_API.h:1.116 --- ZendEngine2/zend_API.h:1.115 Mon Apr 22 10:22:26 2002 +++ ZendEngine2/zend_API.h Tue Apr 23 14:06:52 2002 @@ -252,7 +252,7 @@ ZEND_API int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table TSRMLS_DC); ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length, - int is_ref, int num_symbol_tables, ...); + zend_bool is_ref, int num_symbol_tables, ...); #define add_method(arg, key, method) add_assoc_function((arg), (key), (method)) Index: ZendEngine2/zend_builtin_functions.c diff -u ZendEngine2/zend_builtin_functions.c:1.116 ZendEngine2/zend_builtin_functions.c:1.117 --- ZendEngine2/zend_builtin_functions.c:1.116 Mon Apr 22 10:22:26 2002 +++ ZendEngine2/zend_builtin_functions.c Tue Apr 23 14:06:53 2002 @@ -492,7 +492,7 @@ { zval **arg; char *name; - int name_len; + zend_uint name_len; if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) { ZEND_WRONG_PARAM_COUNT(); Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.284 ZendEngine2/zend_compile.c:1.285 --- ZendEngine2/zend_compile.c:1.284 Sun Apr 7 11:38:45 2002 +++ ZendEngine2/zend_compile.c Tue Apr 23 14:06:53 2002 @@ -156,7 +156,7 @@ } -void zend_do_binary_op(int op, znode *result, znode *op1, znode *op2 TSRMLS_DC) +void zend_do_binary_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC) { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -169,7 +169,7 @@ } -void zend_do_unary_op(int op, znode *result, znode *op1 TSRMLS_DC) +void zend_do_unary_op(zend_uchar op, znode *result, znode *op1 TSRMLS_DC) { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -200,7 +200,7 @@ } } -void zend_do_binary_assign_op(int op, znode *result, znode *op1, znode *op2 TSRMLS_DC) +void zend_do_binary_assign_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC) { int last_op_number = get_next_op_number(CG(active_op_array))-1; zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number]; @@ -264,7 +264,7 @@ } -void fetch_simple_variable_ex(znode *result, znode *varname, int bp, int op TSRMLS_DC) +void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar op TSRMLS_DC) { zend_op opline; zend_op *opline_ptr; @@ -518,7 +518,7 @@ } -void zend_do_pre_incdec(znode *result, znode *op1, int op TSRMLS_DC) +void zend_do_pre_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC) { int last_op_number = get_next_op_number(CG(active_op_array))-1; zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number]; @@ -543,7 +543,7 @@ } -void zend_do_post_incdec(znode *result, znode *op1, int op TSRMLS_DC) +void zend_do_post_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC) { int last_op_number = get_next_op_number(CG(active_op_array))-1; zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number]; @@ -990,7 +990,7 @@ } -void zend_do_receive_arg(int op, znode *var, znode *offset, znode *initialization, unsigned char pass_type TSRMLS_DC) +void zend_do_receive_arg(zend_uchar op, znode *var, znode *offset, znode *initialization, zend_uchar pass_type TSRMLS_DC) { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -1224,7 +1224,7 @@ } -void zend_do_pass_param(znode *param, int op, int offset TSRMLS_DC) +void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC) { zend_op *opline; unsigned char *arg_types; @@ -1828,7 +1828,7 @@ } -void zend_do_brk_cont(int op, znode *expr TSRMLS_DC) +void zend_do_brk_cont(zend_uchar op, znode *expr TSRMLS_DC) { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -2363,7 +2363,7 @@ -void zend_do_init_array(znode *result, znode *expr, znode *offset, int is_ref TSRMLS_DC) +void zend_do_init_array(znode *result, znode *expr, znode *offset, zend_bool is_ref TSRMLS_DC) { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -2386,7 +2386,7 @@ } -void zend_do_add_array_element(znode *result, znode *expr, znode *offset, int is_ref TSRMLS_DC) +void zend_do_add_array_element(znode *result, znode *expr, znode *offset, zend_bool is_ref TSRMLS_DC) { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); Index: ZendEngine2/zend_compile.h diff -u ZendEngine2/zend_compile.h:1.173 ZendEngine2/zend_compile.h:1.174 --- ZendEngine2/zend_compile.h:1.173 Fri Mar 15 10:09:44 2002 +++ ZendEngine2/zend_compile.h Tue Apr 23 14:06:53 2002 @@ -223,13 +223,13 @@ /* parser-driven code generators */ -void zend_do_binary_op(int op, znode *result, znode *op1, znode *op2 TSRMLS_DC); -void zend_do_unary_op(int op, znode *result, znode *op1 TSRMLS_DC); -void zend_do_binary_assign_op(int op, znode *result, znode *op1, znode *op2 TSRMLS_DC); +void zend_do_binary_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC); +void zend_do_unary_op(zend_uchar op, znode *result, znode *op1 TSRMLS_DC); +void zend_do_binary_assign_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC); void zend_do_assign(znode *result, znode *variable, znode *value TSRMLS_DC); void zend_do_assign_ref(znode *result, znode *lvar, znode *rvar TSRMLS_DC); void fetch_simple_variable(znode *result, znode *varname, int bp TSRMLS_DC); -void fetch_simple_variable_ex(znode *result, znode *varname, int bp, int op TSRMLS_DC); +void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar op TSRMLS_DC); void zend_do_indirect_references(znode *result, znode *num_references, znode *variable TSRMLS_DC); void zend_do_fetch_global_or_static_variable(znode *varname, znode *static_assignment, int fetch_type TSRMLS_DC); @@ -257,8 +257,8 @@ void zend_do_for_before_statement(znode *cond_start, znode *second_semicolon_token TSRMLS_DC); void zend_do_for_end(znode *second_semicolon_token TSRMLS_DC); -void zend_do_pre_incdec(znode *result, znode *op1, int op TSRMLS_DC); -void zend_do_post_incdec(znode *result, znode *op1, int op TSRMLS_DC); +void zend_do_pre_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC); +void zend_do_post_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC); void zend_do_begin_variable_parse(TSRMLS_D); void zend_do_end_variable_parse(int type, int arg_offset TSRMLS_DC); @@ -274,7 +274,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference TSRMLS_DC); void zend_do_end_function_declaration(znode *function_token TSRMLS_DC); -void zend_do_receive_arg(int op, znode *var, znode *offset, znode *initialization, unsigned char pass_type TSRMLS_DC); +void zend_do_receive_arg(zend_uchar op, znode *var, znode *offset, znode *initialization, zend_uchar pass_type TSRMLS_DC); int zend_do_begin_function_call(znode *function_name TSRMLS_DC); void zend_do_begin_method_call(znode *left_bracket TSRMLS_DC); void zend_do_begin_dynamic_function_call(znode *function_name TSRMLS_DC); @@ -293,7 +293,7 @@ void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce); void zend_do_early_binding(TSRMLS_D); -void zend_do_pass_param(znode *param, int op, int offset TSRMLS_DC); +void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC); void zend_do_boolean_or_begin(znode *expr1, znode *op_token TSRMLS_DC); @@ -301,7 +301,7 @@ void zend_do_boolean_and_begin(znode *expr1, znode *op_token TSRMLS_DC); void zend_do_boolean_and_end(znode *result, znode *expr1, znode *expr2, znode *op_token TSRMLS_DC); -void zend_do_brk_cont(int op, znode *expr TSRMLS_DC); +void zend_do_brk_cont(zend_uchar op, znode *expr TSRMLS_DC); void zend_do_switch_cond(znode *cond TSRMLS_DC); void zend_do_switch_end(znode *case_list TSRMLS_DC); @@ -327,8 +327,8 @@ void zend_do_shell_exec(znode *result, znode *cmd TSRMLS_DC); -void zend_do_init_array(znode *result, znode *expr, znode *offset, int is_ref TSRMLS_DC); -void zend_do_add_array_element(znode *result, znode *expr, znode *offset, int is_ref TSRMLS_DC); +void zend_do_init_array(znode *result, znode *expr, znode *offset, zend_bool is_ref TSRMLS_DC); +void zend_do_add_array_element(znode *result, znode *expr, znode *offset, zend_bool is_ref TSRMLS_DC); void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr); void zend_do_list_init(TSRMLS_D); void zend_do_list_end(znode *result, znode *expr TSRMLS_DC); @@ -382,7 +382,7 @@ ZEND_API zend_op_array *compile_filename(int type, zval *filename TSRMLS_DC); ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_count, ...); ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC); -ZEND_API void init_op_array(zend_op_array *op_array, int type, int initial_ops_size TSRMLS_DC); +ZEND_API void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size TSRMLS_DC); ZEND_API void destroy_op_array(zend_op_array *op_array); ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC); ZEND_API void zend_file_handle_dtor(zend_file_handle *fh); Index: ZendEngine2/zend_execute.c diff -u ZendEngine2/zend_execute.c:1.337 ZendEngine2/zend_execute.c:1.338 --- ZendEngine2/zend_execute.c:1.337 Fri Mar 15 11:26:17 2002 +++ ZendEngine2/zend_execute.c Tue Apr 23 14:06:53 2002 @@ -427,7 +427,7 @@ break; } if (T->EA.data.str_offset.offset >= T->EA.data.str_offset.str->value.str.len) { - int i; + zend_uint i; if (T->EA.data.str_offset.str->value.str.len==0) { STR_FREE(T->EA.data.str_offset.str->value.str.val); @@ -493,7 +493,7 @@ if (PZVAL_IS_REF(variable_ptr)) { if (variable_ptr!=value) { - short refcount=variable_ptr->refcount; + zend_uint refcount = variable_ptr->refcount; zval garbage; if (type!=IS_TMP_VAR) { @@ -1814,7 +1814,7 @@ zval *class_name; zend_bool is_const; char *class_name_strval; - int class_name_strlen; + zend_uint class_name_strlen; if (EX(opline)->extended_value == ZEND_FETCH_CLASS_SELF) { if (!EG(scope)) { Index: ZendEngine2/zend_execute.h diff -u ZendEngine2/zend_execute.h:1.44 ZendEngine2/zend_execute.h:1.45 --- ZendEngine2/zend_execute.h:1.44 Thu Feb 7 09:08:43 2002 +++ ZendEngine2/zend_execute.h Tue Apr 23 14:06:53 2002 @@ -38,7 +38,7 @@ union { struct { zval *str; - int offset; + zend_uint offset; } str_offset; zend_property_reference overloaded_element; } data; Index: ZendEngine2/zend_execute_API.c diff -u ZendEngine2/zend_execute_API.c:1.160 ZendEngine2/zend_execute_API.c:1.161 --- ZendEngine2/zend_execute_API.c:1.160 Sat Apr 20 16:14:14 2002 +++ ZendEngine2/zend_execute_API.c Tue Apr 23 14:06:53 2002 @@ -642,7 +642,7 @@ zend_op_array *new_op_array; zend_op_array *original_active_op_array = EG(active_op_array); zend_function_state *original_function_state_ptr = EG(function_state_ptr); - int original_handle_op_arrays; + zend_uchar original_handle_op_arrays; int retval; if (retval_ptr) { Index: ZendEngine2/zend_hash.c diff -u ZendEngine2/zend_hash.c:1.85 ZendEngine2/zend_hash.c:1.86 --- ZendEngine2/zend_hash.c:1.85 Fri Apr 19 12:53:35 2002 +++ ZendEngine2/zend_hash.c Tue Apr 23 14:06:54 2002 @@ -161,7 +161,7 @@ } -ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent) +ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent) { uint i = 3; @@ -194,7 +194,7 @@ } -ZEND_API int zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent, zend_bool bApplyProtection) +ZEND_API int zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection) { int retval = zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent); Index: ZendEngine2/zend_hash.h diff -u ZendEngine2/zend_hash.h:1.56 ZendEngine2/zend_hash.h:1.57 --- ZendEngine2/zend_hash.h:1.56 Fri Apr 19 12:53:35 2002 +++ ZendEngine2/zend_hash.h Tue Apr 23 14:06:54 2002 @@ -76,8 +76,8 @@ BEGIN_EXTERN_C() /* startup/shutdown */ -ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent); -ZEND_API int zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent, zend_bool bApplyProtection); +ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent); +ZEND_API int zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection); ZEND_API void zend_hash_destroy(HashTable *ht); ZEND_API void zend_hash_clean(HashTable *ht); Index: ZendEngine2/zend_opcode.c diff -u ZendEngine2/zend_opcode.c:1.70 ZendEngine2/zend_opcode.c:1.71 --- ZendEngine2/zend_opcode.c:1.70 Fri Mar 15 10:09:46 2002 +++ ZendEngine2/zend_opcode.c Tue Apr 23 14:06:54 2002 @@ -50,7 +50,7 @@ -void init_op_array(zend_op_array *op_array, int type, int initial_ops_size TSRMLS_DC) +void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size TSRMLS_DC) { op_array->type = type; Index: ZendEngine2/zend_operators.c diff -u ZendEngine2/zend_operators.c:1.120 ZendEngine2/zend_operators.c:1.121 --- ZendEngine2/zend_operators.c:1.120 Tue Mar 12 14:22:29 2002 +++ ZendEngine2/zend_operators.c Tue Apr 23 14:06:54 2002 @@ -839,7 +839,7 @@ return SUCCESS; } if (op1->type == IS_STRING) { - int i; + zend_uint i; result->type = IS_STRING; result->value.str.val = estrndup(op1->value.str.val, op1->value.str.len); @@ -861,7 +861,7 @@ if (op1->type == IS_STRING && op2->type == IS_STRING) { zval *longer, *shorter; char *result_str; - int i, result_len; + zend_uint i, result_len; if (op1->value.str.len >= op2->value.str.len) { longer = op1; @@ -900,7 +900,7 @@ if (op1->type == IS_STRING && op2->type == IS_STRING) { zval *longer, *shorter; char *result_str; - int i, result_len; + zend_uint i, result_len; if (op1->value.str.len >= op2->value.str.len) { longer = op1; @@ -941,7 +941,7 @@ if (op1->type == IS_STRING && op2->type == IS_STRING) { zval *longer, *shorter; char *result_str; - int i, result_len; + zend_uint i, result_len; if (op1->value.str.len >= op2->value.str.len) { longer = op1; Index: ZendEngine2/zend_operators.h diff -u ZendEngine2/zend_operators.h:1.54 ZendEngine2/zend_operators.h:1.55 --- ZendEngine2/zend_operators.h:1.54 Mon Apr 22 10:22:27 2002 +++ ZendEngine2/zend_operators.h Tue Apr 23 14:06:54 2002 @@ -58,7 +58,7 @@ ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); -static inline int is_numeric_string(char *str, int length, long *lval, double *dval, zend_bool allow_errors) +static inline zend_bool is_numeric_string(char *str, int length, long *lval, double *dval, zend_bool allow_errors) { long local_lval; double local_dval; Index: ZendEngine2/zend_ts_hash.c diff -u ZendEngine2/zend_ts_hash.c:1.2 ZendEngine2/zend_ts_hash.c:1.3 --- ZendEngine2/zend_ts_hash.c:1.2 Sat Mar 23 07:18:50 2002 +++ ZendEngine2/zend_ts_hash.c Tue Apr 23 14:06:54 2002 @@ -50,7 +50,7 @@ } /* delegates */ -ZEND_API int zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent) +ZEND_API int zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent) { ht->mx_reader = tsrm_mutex_alloc(); ht->mx_writer = tsrm_mutex_alloc(); @@ -58,7 +58,7 @@ return zend_hash_init(&(ht->hash), nSize, pHashFunction, pDestructor, persistent); } -ZEND_API int zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent, zend_bool bApplyProtection) +ZEND_API int zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection) { ht->mx_reader = tsrm_mutex_alloc(); ht->mx_writer = tsrm_mutex_alloc(); Index: ZendEngine2/zend_ts_hash.h diff -u ZendEngine2/zend_ts_hash.h:1.2 ZendEngine2/zend_ts_hash.h:1.3 --- ZendEngine2/zend_ts_hash.h:1.2 Sat Mar 23 07:18:50 2002 +++ ZendEngine2/zend_ts_hash.h Tue Apr 23 14:06:54 2002 @@ -33,8 +33,8 @@ BEGIN_EXTERN_C() /* startup/shutdown */ -ZEND_API int zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent); -ZEND_API int zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent, zend_bool bApplyProtection); +ZEND_API int zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent); +ZEND_API int zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection); ZEND_API void zend_ts_hash_destroy(TsHashTable *ht); ZEND_API void zend_ts_hash_clean(TsHashTable *ht);