diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-01-15 12:30:54 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-01-15 12:33:06 +0100 |
commit | 3e01f5afb1b52fe26a956190296de0192eedeec1 (patch) | |
tree | 77531ec93e3f3cef9891c77b5ca553eb8487f121 | |
parent | e2c8ab7c33ac5328485c43db5080c5bf4911ce38 (diff) | |
download | php-git-3e01f5afb1b52fe26a956190296de0192eedeec1.tar.gz |
Replace zend_bool uses with bool
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.
Of course, zend_bool is retained as an alias.
368 files changed, 2001 insertions, 2001 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index 5fb7f54b11..22cdc744e6 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -60,7 +60,7 @@ ZEND_TSRMLS_CACHE_DEFINE() #endif ZEND_API zend_utility_values zend_uv; -ZEND_API zend_bool zend_dtrace_enabled; +ZEND_API bool zend_dtrace_enabled; /* version information */ static char *zend_version_info; @@ -92,7 +92,7 @@ static void (*zend_message_dispatcher_p)(zend_long message, const void *data); static zval *(*zend_get_configuration_directive_p)(zend_string *name); #if ZEND_RC_DEBUG -ZEND_API zend_bool zend_rc_debug = 0; +ZEND_API bool zend_rc_debug = 0; #endif static ZEND_INI_MH(OnUpdateErrorReporting) /* {{{ */ @@ -108,7 +108,7 @@ static ZEND_INI_MH(OnUpdateErrorReporting) /* {{{ */ static ZEND_INI_MH(OnUpdateGCEnabled) /* {{{ */ { - zend_bool val; + bool val; val = zend_ini_parse_bool(new_value); gc_enable(val); @@ -290,7 +290,7 @@ ZEND_API zend_string *zend_strpprintf_unchecked(size_t max_len, const char *form static void zend_print_zval_r_to_buf(smart_str *buf, zval *expr, int indent); -static void print_hash(smart_str *buf, HashTable *ht, int indent, zend_bool is_object) /* {{{ */ +static void print_hash(smart_str *buf, HashTable *ht, int indent, bool is_object) /* {{{ */ { zval *tmp; zend_string *string_key; @@ -524,7 +524,7 @@ static FILE *zend_fopen_wrapper(const char *filename, zend_string **opened_path) /* }}} */ #ifdef ZTS -static zend_bool short_tags_default = 1; +static bool short_tags_default = 1; static uint32_t compiler_options_default = ZEND_COMPILE_DEFAULT; #else # define short_tags_default 1 @@ -784,7 +784,7 @@ static void module_destructor_zval(zval *zv) /* {{{ */ } /* }}} */ -static zend_bool php_auto_globals_create_globals(zend_string *name) /* {{{ */ +static bool php_auto_globals_create_globals(zend_string *name) /* {{{ */ { /* While we keep registering $GLOBALS as an auto-global, we do not create an * actual variable for it. Access to it handled specially by the compiler. */ @@ -1287,7 +1287,7 @@ static ZEND_COLD void zend_error_impl( zval params[4]; zval retval; zval orig_user_error_handler; - zend_bool in_compilation; + bool in_compilation; zend_class_entry *saved_class_entry; zend_stack loop_var_stack; zend_stack delayed_oplines_stack; @@ -1591,7 +1591,7 @@ ZEND_API ZEND_COLD void zend_value_error(const char *format, ...) /* {{{ */ va_end(va); } /* }}} */ -ZEND_API ZEND_COLD void zend_output_debug_string(zend_bool trigger_break, const char *format, ...) /* {{{ */ +ZEND_API ZEND_COLD void zend_output_debug_string(bool trigger_break, const char *format, ...) /* {{{ */ { #if ZEND_DEBUG va_list args; diff --git a/Zend/zend.h b/Zend/zend.h index f5d352cfe4..6a2a834d93 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -203,7 +203,7 @@ typedef struct _zend_utility_functions { } zend_utility_functions; typedef struct _zend_utility_values { - zend_bool html_errors; + bool html_errors; } zend_utility_values; typedef size_t (*zend_write_func_t)(const char *str, size_t str_length); @@ -255,7 +255,7 @@ ZEND_API void zend_print_flat_zval_r(zval *expr); #define zend_print_variable(var) \ zend_print_zval((var), 0) -ZEND_API ZEND_COLD void zend_output_debug_string(zend_bool trigger_break, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); +ZEND_API ZEND_COLD void zend_output_debug_string(bool trigger_break, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); ZEND_API void zend_activate(void); ZEND_API void zend_deactivate(void); @@ -316,7 +316,7 @@ extern ZEND_API zend_class_entry *zend_standard_class_def; extern ZEND_API zend_utility_values zend_uv; /* If DTrace is available and enabled */ -extern ZEND_API zend_bool zend_dtrace_enabled; +extern ZEND_API bool zend_dtrace_enabled; END_EXTERN_C() #define ZEND_UV(name) (zend_uv.name) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 8a265e907c..2e89bddc47 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -426,7 +426,7 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **p } /* }}} */ -ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, zend_bool *dest) /* {{{ */ +ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest) /* {{{ */ { if (EXPECTED(Z_TYPE_P(arg) <= IS_STRING)) { *dest = zend_is_true(arg); @@ -437,7 +437,7 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, zend_bool *dest) } /* }}} */ -ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, zend_bool *dest) /* {{{ */ +ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, bool *dest) /* {{{ */ { if (UNEXPECTED(ZEND_ARG_USES_STRICT_TYPES())) { return 0; @@ -644,10 +644,10 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec case 'l': { zend_long *p = va_arg(*va, zend_long *); - zend_bool *is_null = NULL; + bool *is_null = NULL; if (check_null) { - is_null = va_arg(*va, zend_bool *); + is_null = va_arg(*va, bool *); } if (!zend_parse_arg_long(arg, p, is_null, check_null)) { @@ -659,10 +659,10 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec case 'd': { double *p = va_arg(*va, double *); - zend_bool *is_null = NULL; + bool *is_null = NULL; if (check_null) { - is_null = va_arg(*va, zend_bool *); + is_null = va_arg(*va, bool *); } if (!zend_parse_arg_double(arg, p, is_null, check_null)) { @@ -731,11 +731,11 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec case 'b': { - zend_bool *p = va_arg(*va, zend_bool *); - zend_bool *is_null = NULL; + bool *p = va_arg(*va, bool *); + bool *is_null = NULL; if (check_null) { - is_null = va_arg(*va, zend_bool *); + is_null = va_arg(*va, bool *); } if (!zend_parse_arg_bool(arg, p, is_null, check_null)) { @@ -956,8 +956,8 @@ static zend_result zend_parse_va_args(uint32_t num_args, const char *type_spec, uint32_t max_num_args = 0; uint32_t post_varargs = 0; zval *arg; - zend_bool have_varargs = 0; - zend_bool have_optional_args = 0; + bool have_varargs = 0; + bool have_optional_args = 0; zval **varargs = NULL; int *n_varargs = NULL; @@ -1130,7 +1130,7 @@ ZEND_API zend_result zend_parse_method_parameters(uint32_t num_args, zval *this_ * Z_OBJ(EG(This)) to NULL when calling an internal function with common.scope == NULL. * In that case EG(This) would still be the $this from the calling code and we'd take the * wrong branch here. */ - zend_bool is_method = EG(current_execute_data)->func->common.scope != NULL; + bool is_method = EG(current_execute_data)->func->common.scope != NULL; if (!is_method || !this_ptr || Z_TYPE_P(this_ptr) != IS_OBJECT) { va_start(va, type_spec); @@ -1681,7 +1681,7 @@ ZEND_API zend_result add_next_index_null(zval *arg) /* {{{ */ } /* }}} */ -ZEND_API zend_result add_next_index_bool(zval *arg, zend_bool b) /* {{{ */ +ZEND_API zend_result add_next_index_bool(zval *arg, bool b) /* {{{ */ { zval tmp; @@ -2949,7 +2949,7 @@ ZEND_API zend_result zend_register_class_alias_ex(const char *name, size_t name_ /* }}} */ // TODO num_symbol_tables as unsigned int? -ZEND_API zend_result zend_set_hash_symbol(zval *symbol, const char *name, size_t name_length, zend_bool is_ref, int num_symbol_tables, ...) /* {{{ */ +ZEND_API zend_result zend_set_hash_symbol(zval *symbol, const char *name, size_t name_length, bool is_ref, int num_symbol_tables, ...) /* {{{ */ { HashTable *symbol_table; va_list symbol_table_list; @@ -3448,11 +3448,11 @@ ZEND_API zend_string *zend_get_callable_name(zval *callable) /* {{{ */ } /* }}} */ -ZEND_API zend_bool zend_is_callable_at_frame( +ZEND_API bool zend_is_callable_at_frame( zval *callable, zend_object *object, zend_execute_data *frame, uint32_t check_flags, zend_fcall_info_cache *fcc, char **error) /* {{{ */ { - zend_bool ret; + bool ret; zend_fcall_info_cache fcc_local; bool strict_class = 0; @@ -3569,7 +3569,7 @@ check_func: } /* }}} */ -ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error) /* {{{ */ +ZEND_API bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error) /* {{{ */ { /* Determine callability at the first parent user frame. */ zend_execute_data *frame = EG(current_execute_data); @@ -3577,20 +3577,20 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint frame = frame->prev_execute_data; } - zend_bool ret = zend_is_callable_at_frame(callable, object, frame, check_flags, fcc, error); + bool ret = zend_is_callable_at_frame(callable, object, frame, check_flags, fcc, error); if (callable_name) { *callable_name = zend_get_callable_name_ex(callable, object); } return ret; } -ZEND_API zend_bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name) /* {{{ */ +ZEND_API bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name) /* {{{ */ { return zend_is_callable_ex(callable, NULL, check_flags, callable_name, NULL, NULL); } /* }}} */ -ZEND_API zend_bool zend_make_callable(zval *callable, zend_string **callable_name) /* {{{ */ +ZEND_API bool zend_make_callable(zval *callable, zend_string **callable_name) /* {{{ */ { zend_fcall_info_cache fcc; @@ -3790,7 +3790,7 @@ static inline zend_string *zval_make_interned_string(zval *zv) /* {{{ */ return Z_STR_P(zv); } -static zend_always_inline zend_bool is_persistent_class(zend_class_entry *ce) { +static zend_always_inline bool is_persistent_class(zend_class_entry *ce) { return (ce->type & ZEND_INTERNAL_CLASS) && ce->info.internal.module->type == MODULE_PERSISTENT; } @@ -3898,7 +3898,7 @@ ZEND_API zend_property_info *zend_declare_typed_property(zend_class_entry *ce, z } /* }}} */ -ZEND_API zend_result zend_try_assign_typed_ref_ex(zend_reference *ref, zval *val, zend_bool strict) /* {{{ */ +ZEND_API zend_result zend_try_assign_typed_ref_ex(zend_reference *ref, zval *val, bool strict) /* {{{ */ { if (UNEXPECTED(!zend_verify_ref_assignable_zval(ref, val, strict))) { zval_ptr_dtor(val); @@ -3926,7 +3926,7 @@ ZEND_API zend_result zend_try_assign_typed_ref_null(zend_reference *ref) /* {{{ } /* }}} */ -ZEND_API zend_result zend_try_assign_typed_ref_bool(zend_reference *ref, zend_bool val) /* {{{ */ +ZEND_API zend_result zend_try_assign_typed_ref_bool(zend_reference *ref, bool val) /* {{{ */ { zval tmp; @@ -4016,7 +4016,7 @@ ZEND_API zend_result zend_try_assign_typed_ref_zval(zend_reference *ref, zval *z } /* }}} */ -ZEND_API zend_result zend_try_assign_typed_ref_zval_ex(zend_reference *ref, zval *zv, zend_bool strict) /* {{{ */ +ZEND_API zend_result zend_try_assign_typed_ref_zval_ex(zend_reference *ref, zval *zv, bool strict) /* {{{ */ { zval tmp; @@ -4167,7 +4167,7 @@ ZEND_API void zend_declare_class_constant_long(zend_class_entry *ce, const char } /* }}} */ -ZEND_API void zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_bool value) /* {{{ */ +ZEND_API void zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, bool value) /* {{{ */ { zval constant; @@ -4408,7 +4408,7 @@ ZEND_API zend_result zend_update_static_property_stringl(zend_class_entry *scope } /* }}} */ -ZEND_API zval *zend_read_property_ex(zend_class_entry *scope, zend_object *object, zend_string *name, zend_bool silent, zval *rv) /* {{{ */ +ZEND_API zval *zend_read_property_ex(zend_class_entry *scope, zend_object *object, zend_string *name, bool silent, zval *rv) /* {{{ */ { zval *value; zend_class_entry *old_scope = EG(fake_scope); @@ -4422,7 +4422,7 @@ ZEND_API zval *zend_read_property_ex(zend_class_entry *scope, zend_object *objec } /* }}} */ -ZEND_API zval *zend_read_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, zend_bool silent, zval *rv) /* {{{ */ +ZEND_API zval *zend_read_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, bool silent, zval *rv) /* {{{ */ { zval *value; zend_string *str; @@ -4434,7 +4434,7 @@ ZEND_API zval *zend_read_property(zend_class_entry *scope, zend_object *object, } /* }}} */ -ZEND_API zval *zend_read_static_property_ex(zend_class_entry *scope, zend_string *name, zend_bool silent) /* {{{ */ +ZEND_API zval *zend_read_static_property_ex(zend_class_entry *scope, zend_string *name, bool silent) /* {{{ */ { zval *property; zend_class_entry *old_scope = EG(fake_scope); @@ -4447,7 +4447,7 @@ ZEND_API zval *zend_read_static_property_ex(zend_class_entry *scope, zend_string } /* }}} */ -ZEND_API zval *zend_read_static_property(zend_class_entry *scope, const char *name, size_t name_length, zend_bool silent) /* {{{ */ +ZEND_API zval *zend_read_static_property(zend_class_entry *scope, const char *name, size_t name_length, bool silent) /* {{{ */ { zend_string *key = zend_string_init(name, name_length, 0); zval *property = zend_read_static_property_ex(scope, key, silent); @@ -4493,7 +4493,7 @@ ZEND_API ZEND_COLD const char *zend_get_object_type(const zend_class_entry *ce) } /* }}} */ -ZEND_API zend_bool zend_is_iterable(zval *iterable) /* {{{ */ +ZEND_API bool zend_is_iterable(zval *iterable) /* {{{ */ { switch (Z_TYPE_P(iterable)) { case IS_ARRAY: @@ -4506,7 +4506,7 @@ ZEND_API zend_bool zend_is_iterable(zval *iterable) /* {{{ */ } /* }}} */ -ZEND_API zend_bool zend_is_countable(zval *countable) /* {{{ */ +ZEND_API bool zend_is_countable(zval *countable) /* {{{ */ { switch (Z_TYPE_P(countable)) { case IS_ARRAY: diff --git a/Zend/zend_API.h b/Zend/zend_API.h index ee481681d0..89eb6312d6 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -352,12 +352,12 @@ ZEND_API ZEND_COLD void zend_wrong_param_count(void); ZEND_API void zend_release_fcall_info_cache(zend_fcall_info_cache *fcc); ZEND_API zend_string *zend_get_callable_name_ex(zval *callable, zend_object *object); ZEND_API zend_string *zend_get_callable_name(zval *callable); -ZEND_API zend_bool zend_is_callable_at_frame( +ZEND_API bool zend_is_callable_at_frame( zval *callable, zend_object *object, zend_execute_data *frame, uint32_t check_flags, zend_fcall_info_cache *fcc, char **error); -ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error); -ZEND_API zend_bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name); -ZEND_API zend_bool zend_make_callable(zval *callable, zend_string **callable_name); +ZEND_API bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error); +ZEND_API bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name); +ZEND_API bool zend_make_callable(zval *callable, zend_string **callable_name); ZEND_API const char *zend_get_module_version(const char *module_name); ZEND_API int zend_get_module_started(const char *module_name); @@ -376,7 +376,7 @@ ZEND_API zend_class_constant *zend_declare_class_constant_ex(zend_class_entry *c ZEND_API void zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value); ZEND_API void zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length); ZEND_API void zend_declare_class_constant_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value); -ZEND_API void zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_bool value); +ZEND_API void zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, bool value); ZEND_API void zend_declare_class_constant_double(zend_class_entry *ce, const char *name, size_t name_length, double value); ZEND_API void zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length); ZEND_API void zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value); @@ -403,11 +403,11 @@ ZEND_API zend_result zend_update_static_property_double(zend_class_entry *scope, ZEND_API zend_result zend_update_static_property_string(zend_class_entry *scope, const char *name, size_t name_length, const char *value); ZEND_API zend_result zend_update_static_property_stringl(zend_class_entry *scope, const char *name, size_t name_length, const char *value, size_t value_length); -ZEND_API zval *zend_read_property_ex(zend_class_entry *scope, zend_object *object, zend_string *name, zend_bool silent, zval *rv); -ZEND_API zval *zend_read_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, zend_bool silent, zval *rv); +ZEND_API zval *zend_read_property_ex(zend_class_entry *scope, zend_object *object, zend_string *name, bool silent, zval *rv); +ZEND_API zval *zend_read_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, bool silent, zval *rv); -ZEND_API zval *zend_read_static_property_ex(zend_class_entry *scope, zend_string *name, zend_bool silent); -ZEND_API zval *zend_read_static_property(zend_class_entry *scope, const char *name, size_t name_length, zend_bool silent); +ZEND_API zval *zend_read_static_property_ex(zend_class_entry *scope, zend_string *name, bool silent); +ZEND_API zval *zend_read_static_property(zend_class_entry *scope, const char *name, size_t name_length, bool silent); ZEND_API const char *zend_get_type_by_const(int type); @@ -482,7 +482,7 @@ static zend_always_inline zend_result add_index_zval(zval *arg, zend_ulong index ZEND_API zend_result add_next_index_long(zval *arg, zend_long n); ZEND_API zend_result add_next_index_null(zval *arg); -ZEND_API zend_result add_next_index_bool(zval *arg, zend_bool b); +ZEND_API zend_result add_next_index_bool(zval *arg, bool b); ZEND_API zend_result add_next_index_resource(zval *arg, zend_resource *r); ZEND_API zend_result add_next_index_double(zval *arg, double d); ZEND_API zend_result add_next_index_str(zval *arg, zend_string *str); @@ -623,7 +623,7 @@ static zend_always_inline void zend_call_known_instance_method_with_1_params( ZEND_API void zend_call_known_instance_method_with_2_params( zend_function *fn, zend_object *object, zval *retval_ptr, zval *param1, zval *param2); -ZEND_API zend_result zend_set_hash_symbol(zval *symbol, const char *name, size_t name_length, zend_bool is_ref, int num_symbol_tables, ...); +ZEND_API zend_result zend_set_hash_symbol(zval *symbol, const char *name, size_t name_length, bool is_ref, int num_symbol_tables, ...); ZEND_API zend_result zend_delete_global_variable(zend_string *name); @@ -648,9 +648,9 @@ static zend_always_inline zend_result zend_forbid_dynamic_call(const char *func_ ZEND_API ZEND_COLD const char *zend_get_object_type(const zend_class_entry *ce); -ZEND_API zend_bool zend_is_iterable(zval *iterable); +ZEND_API bool zend_is_iterable(zval *iterable); -ZEND_API zend_bool zend_is_countable(zval *countable); +ZEND_API bool zend_is_countable(zval *countable); ZEND_API zend_result zend_get_default_from_internal_arg_info( zval *default_value_zval, zend_internal_arg_info *arg_info); @@ -797,11 +797,11 @@ END_EXTERN_C() /* May modify arg in-place. Will free arg in failure case (and take ownership in success case). * Prefer using the ZEND_TRY_ASSIGN_* macros over these APIs. */ -ZEND_API zend_result zend_try_assign_typed_ref_ex(zend_reference *ref, zval *zv, zend_bool strict); +ZEND_API zend_result zend_try_assign_typed_ref_ex(zend_reference *ref, zval *zv, bool strict); ZEND_API zend_result zend_try_assign_typed_ref(zend_reference *ref, zval *zv); ZEND_API zend_result zend_try_assign_typed_ref_null(zend_reference *ref); -ZEND_API zend_result zend_try_assign_typed_ref_bool(zend_reference *ref, zend_bool val); +ZEND_API zend_result zend_try_assign_typed_ref_bool(zend_reference *ref, bool val); ZEND_API zend_result zend_try_assign_typed_ref_long(zend_reference *ref, zend_long lval); ZEND_API zend_result zend_try_assign_typed_ref_double(zend_reference *ref, double dval); ZEND_API zend_result zend_try_assign_typed_ref_empty_string(zend_reference *ref); @@ -811,7 +811,7 @@ ZEND_API zend_result zend_try_assign_typed_ref_stringl(zend_reference *ref, cons ZEND_API zend_result zend_try_assign_typed_ref_arr(zend_reference *ref, zend_array *arr); ZEND_API zend_result zend_try_assign_typed_ref_res(zend_reference *ref, zend_resource *res); ZEND_API zend_result zend_try_assign_typed_ref_zval(zend_reference *ref, zval *zv); -ZEND_API zend_result zend_try_assign_typed_ref_zval_ex(zend_reference *ref, zval *zv, zend_bool strict); +ZEND_API zend_result zend_try_assign_typed_ref_zval_ex(zend_reference *ref, zval *zv, bool strict); #define _ZEND_TRY_ASSIGN_NULL(zv, is_ref) do { \ zval *_zv = zv; \ @@ -1300,8 +1300,8 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char * zval *_real_arg, *_arg = NULL; \ zend_expected_type _expected_type = Z_EXPECTED_LONG; \ char *_error = NULL; \ - ZEND_ATTRIBUTE_UNUSED zend_bool _dummy; \ - zend_bool _optional = 0; \ + ZEND_ATTRIBUTE_UNUSED bool _dummy; \ + bool _optional = 0; \ int _error_code = ZPP_ERROR_OK; \ ((void)_i); \ ((void)_real_arg); \ @@ -1847,8 +1847,8 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char * /* Inlined implementations shared by new and old parameter parsing APIs */ ZEND_API bool ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pce, uint32_t num, bool check_null); -ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, zend_bool *dest); -ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, zend_bool *dest); +ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, bool *dest); +ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest); ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_slow(zval *arg, zend_long *dest); ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(zval *arg, zend_long *dest); ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_slow(zval *arg, double *dest); @@ -1858,7 +1858,7 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **des ZEND_API bool ZEND_FASTCALL zend_parse_arg_number_slow(zval *arg, zval **dest); ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_or_long_slow(zval *arg, zend_string **dest_str, zend_long *dest_long); -static zend_always_inline bool zend_parse_arg_bool(zval *arg, zend_bool *dest, zend_bool *is_null, bool check_null) +static zend_always_inline bool zend_parse_arg_bool(zval *arg, bool *dest, bool *is_null, bool check_null) { if (check_null) { *is_null = 0; @@ -1876,7 +1876,7 @@ static zend_always_inline bool zend_parse_arg_bool(zval *arg, zend_bool *dest, z return 1; } -static zend_always_inline bool zend_parse_arg_long(zval *arg, zend_long *dest, zend_bool *is_null, bool check_null) +static zend_always_inline bool zend_parse_arg_long(zval *arg, zend_long *dest, bool *is_null, bool check_null) { if (check_null) { *is_null = 0; @@ -1892,7 +1892,7 @@ static zend_always_inline bool zend_parse_arg_long(zval *arg, zend_long *dest, z return 1; } -static zend_always_inline bool zend_parse_arg_double(zval *arg, double *dest, zend_bool *is_null, bool check_null) +static zend_always_inline bool zend_parse_arg_double(zval *arg, double *dest, bool *is_null, bool check_null) { if (check_null) { *is_null = 0; @@ -2027,7 +2027,7 @@ static zend_always_inline bool zend_parse_arg_array_ht(zval *arg, HashTable **de } static zend_always_inline bool zend_parse_arg_array_ht_or_long( - zval *arg, HashTable **dest_ht, zend_long *dest_long, zend_bool *is_null, bool allow_null + zval *arg, HashTable **dest_ht, zend_long *dest_long, bool *is_null, bool allow_null ) { if (allow_null) { *is_null = 0; @@ -2076,7 +2076,7 @@ static zend_always_inline bool zend_parse_arg_obj(zval *arg, zend_object **dest, } static zend_always_inline bool zend_parse_arg_obj_or_long( - zval *arg, zend_object **dest_obj, zend_class_entry *ce, zend_long *dest_long, zend_bool *is_null, bool allow_null + zval *arg, zend_object **dest_obj, zend_class_entry *ce, zend_long *dest_long, bool *is_null, bool allow_null ) { if (allow_null) { *is_null = 0; @@ -2159,7 +2159,7 @@ static zend_always_inline bool zend_parse_arg_array_ht_or_str( } static zend_always_inline bool zend_parse_arg_str_or_long(zval *arg, zend_string **dest_str, zend_long *dest_long, - zend_bool *is_null, bool allow_null) + bool *is_null, bool allow_null) { if (allow_null) { *is_null = 0; diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 750a4a6375..97f77827d8 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -1510,7 +1510,7 @@ static zend_never_inline void *zend_mm_realloc_huge(zend_mm_heap *heap, void *pt return zend_mm_realloc_slow(heap, ptr, size, MIN(old_size, copy_size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); } -static zend_always_inline void *zend_mm_realloc_heap(zend_mm_heap *heap, void *ptr, size_t size, zend_bool use_copy_size, size_t copy_size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +static zend_always_inline void *zend_mm_realloc_heap(zend_mm_heap *heap, void *ptr, size_t size, bool use_copy_size, size_t copy_size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) { size_t page_offset; size_t old_size; @@ -2789,7 +2789,7 @@ static void alloc_globals_ctor(zend_alloc_globals *alloc_globals) #if ZEND_MM_CUSTOM tmp = getenv("USE_ZEND_ALLOC"); if (tmp && !zend_atoi(tmp, 0)) { - zend_bool tracked = (tmp = getenv("USE_TRACKED_ALLOC")) && zend_atoi(tmp, 0); + bool tracked = (tmp = getenv("USE_TRACKED_ALLOC")) && zend_atoi(tmp, 0); zend_mm_heap *mm_heap = alloc_globals->mm_heap = malloc(sizeof(zend_mm_heap)); memset(mm_heap, 0, sizeof(zend_mm_heap)); mm_heap->use_custom_heap = ZEND_MM_CUSTOM_HEAP_STD; diff --git a/Zend/zend_arena.h b/Zend/zend_arena.h index ff2d0a5fe6..a44082e52f 100644 --- a/Zend/zend_arena.h +++ b/Zend/zend_arena.h @@ -110,7 +110,7 @@ static zend_always_inline void zend_arena_release(zend_arena **arena_ptr, void * arena->ptr = (char*)checkpoint; } -static zend_always_inline zend_bool zend_arena_contains(zend_arena *arena, void *ptr) +static zend_always_inline bool zend_arena_contains(zend_arena *arena, void *ptr) { while (arena) { if ((char*)ptr > (char*)arena && (char*)ptr <= arena->ptr) { @@ -213,7 +213,7 @@ static zend_always_inline void zend_arena_release(zend_arena **arena_ptr, void * } } -static zend_always_inline zend_bool zend_arena_contains(zend_arena *arena, void *ptr) +static zend_always_inline bool zend_arena_contains(zend_arena *arena, void *ptr) { /* TODO: Dummy */ return 1; diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index cb61bec5d7..b2af322d91 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -423,7 +423,7 @@ ZEND_API zend_ast *zend_ast_create_list(uint32_t init_children, zend_ast_kind ki } #endif -static inline zend_bool is_power_of_two(uint32_t n) { +static inline bool is_power_of_two(uint32_t n) { return ((n != 0) && (n == (n & (~n + 1)))); } @@ -1375,7 +1375,7 @@ static ZEND_COLD void zend_ast_export_attribute_group(smart_str *str, zend_ast * } } -static ZEND_COLD void zend_ast_export_attributes(smart_str *str, zend_ast *ast, int indent, zend_bool newlines) { +static ZEND_COLD void zend_ast_export_attributes(smart_str *str, zend_ast *ast, int indent, bool newlines) { zend_ast_list *list = zend_ast_get_list(ast); uint32_t i; @@ -1497,7 +1497,7 @@ tail_call: case ZEND_AST_METHOD: decl = (zend_ast_decl *) ast; if (decl->child[4]) { - zend_bool newlines = !(ast->kind == ZEND_AST_CLOSURE || ast->kind == ZEND_AST_ARROW_FUNC); + bool newlines = !(ast->kind == ZEND_AST_CLOSURE || ast->kind == ZEND_AST_ARROW_FUNC); zend_ast_export_attributes(str, decl->child[4], indent, newlines); } diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h index eb02e9bea0..4d7335853e 100644 --- a/Zend/zend_ast.h +++ b/Zend/zend_ast.h @@ -301,11 +301,11 @@ ZEND_API void ZEND_FASTCALL zend_ast_ref_destroy(zend_ast_ref *ast); typedef void (*zend_ast_apply_func)(zend_ast **ast_ptr); ZEND_API void zend_ast_apply(zend_ast *ast, zend_ast_apply_func fn); -static zend_always_inline zend_bool zend_ast_is_special(zend_ast *ast) { +static zend_always_inline bool zend_ast_is_special(zend_ast *ast) { return (ast->kind >> ZEND_AST_SPECIAL_SHIFT) & 1; } -static zend_always_inline zend_bool zend_ast_is_list(zend_ast *ast) { +static zend_always_inline bool zend_ast_is_list(zend_ast *ast) { return (ast->kind >> ZEND_AST_IS_LIST_SHIFT) & 1; } static zend_always_inline zend_ast_list *zend_ast_get_list(zend_ast *ast) { diff --git a/Zend/zend_attributes.c b/Zend/zend_attributes.c index ae07802b5b..9921e6adb0 100644 --- a/Zend/zend_attributes.c +++ b/Zend/zend_attributes.c @@ -163,7 +163,7 @@ ZEND_API zend_string *zend_get_attribute_target_names(uint32_t flags) return smart_str_extract(&str); } -ZEND_API zend_bool zend_is_attribute_repeated(HashTable *attributes, zend_attribute *attr) +ZEND_API bool zend_is_attribute_repeated(HashTable *attributes, zend_attribute *attr) { zend_attribute *other; diff --git a/Zend/zend_attributes.h b/Zend/zend_attributes.h index d19b7e470d..fa21896447 100644 --- a/Zend/zend_attributes.h +++ b/Zend/zend_attributes.h @@ -72,7 +72,7 @@ ZEND_API zend_attribute *zend_get_parameter_attribute_str(HashTable *attributes, ZEND_API zend_result zend_get_attribute_value(zval *ret, zend_attribute *attr, uint32_t i, zend_class_entry *scope); ZEND_API zend_string *zend_get_attribute_target_names(uint32_t targets); -ZEND_API zend_bool zend_is_attribute_repeated(HashTable *attributes, zend_attribute *attr); +ZEND_API bool zend_is_attribute_repeated(HashTable *attributes, zend_attribute *attr); ZEND_API zend_internal_attribute *zend_internal_attribute_register(zend_class_entry *ce, uint32_t flags); ZEND_API zend_internal_attribute *zend_internal_attribute_get(zend_string *lcname); diff --git a/Zend/zend_bitset.h b/Zend/zend_bitset.h index b7c369c749..2bc0ca105d 100644 --- a/Zend/zend_bitset.h +++ b/Zend/zend_bitset.h @@ -122,7 +122,7 @@ static inline uint32_t zend_bitset_len(uint32_t n) return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); } -static inline zend_bool zend_bitset_in(zend_bitset set, uint32_t n) +static inline bool zend_bitset_in(zend_bitset set, uint32_t n) { return ZEND_BIT_TEST(set, n); } @@ -158,7 +158,7 @@ static inline void zend_bitset_fill(zend_bitset set, uint32_t len) memset(set, 0xff, len * ZEND_BITSET_ELM_SIZE); } -static inline zend_bool zend_bitset_equal(zend_bitset set1, zend_bitset set2, uint32_t len) +static inline bool zend_bitset_equal(zend_bitset set1, zend_bitset set2, uint32_t len) { return memcmp(set1, set2, len * ZEND_BITSET_ELM_SIZE) == 0; } @@ -213,7 +213,7 @@ static inline void zend_bitset_union_with_difference(zend_bitset set1, zend_bits } } -static inline zend_bool zend_bitset_subset(zend_bitset set1, zend_bitset set2, uint32_t len) +static inline bool zend_bitset_subset(zend_bitset set1, zend_bitset set2, uint32_t len) { uint32_t i; diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 7980bdc802..fa65d1ca07 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -370,7 +370,7 @@ ZEND_FUNCTION(strncasecmp) ZEND_FUNCTION(error_reporting) { zend_long err; - zend_bool err_is_null = 1; + bool err_is_null = 1; int old_error_reporting; ZEND_PARSE_PARAMETERS_START(0, 1) @@ -483,7 +483,7 @@ ZEND_FUNCTION(define) { zend_string *name; zval *val, val_free; - zend_bool non_cs = 0; + bool non_cs = 0; zend_constant c; ZEND_PARSE_PARAMETERS_START(2, 3) @@ -631,14 +631,14 @@ ZEND_FUNCTION(get_parent_class) } /* }}} */ -static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass) /* {{{ */ +static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, bool only_subclass) /* {{{ */ { zval *obj; zend_string *class_name; zend_class_entry *instance_ce; zend_class_entry *ce; - zend_bool allow_string = only_subclass; - zend_bool retval; + bool allow_string = only_subclass; + bool retval; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ZVAL(obj) @@ -794,7 +794,7 @@ ZEND_FUNCTION(get_object_vars) array_init_size(return_value, zend_hash_num_elements(properties)); ZEND_HASH_FOREACH_KEY_VAL(properties, num_key, key, value) { - zend_bool is_dynamic = 1; + bool is_dynamic = 1; if (Z_TYPE_P(value) == IS_INDIRECT) { value = Z_INDIRECT_P(value); if (UNEXPECTED(Z_ISUNDEF_P(value))) { @@ -1007,7 +1007,7 @@ static inline void class_exists_impl(INTERNAL_FUNCTION_PARAMETERS, int flags, in zend_string *name; zend_string *lcname; zend_class_entry *ce; - zend_bool autoload = 1; + bool autoload = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(name) @@ -1063,7 +1063,7 @@ ZEND_FUNCTION(trait_exists) ZEND_FUNCTION(function_exists) { zend_string *name; - zend_bool exists; + bool exists; zend_string *lcname; ZEND_PARSE_PARAMETERS_START(1, 1) @@ -1092,7 +1092,7 @@ ZEND_FUNCTION(class_alias) char *alias_name; zend_class_entry *ce; size_t alias_name_len; - zend_bool autoload = 1; + bool autoload = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ss|b", &class_name, &alias_name, &alias_name_len, &autoload) == FAILURE) { RETURN_THROWS(); @@ -1326,7 +1326,7 @@ ZEND_FUNCTION(get_defined_functions) zval internal, user; zend_string *key; zend_function *func; - zend_bool exclude_disabled = 1; + bool exclude_disabled = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &exclude_disabled) == FAILURE) { RETURN_THROWS(); @@ -1474,7 +1474,7 @@ static void add_zendext_info(zend_extension *ext, void *arg) /* {{{ */ /* {{{ Return an array containing names of loaded extensions */ ZEND_FUNCTION(get_loaded_extensions) { - zend_bool zendext = 0; + bool zendext = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &zendext) == FAILURE) { RETURN_THROWS(); @@ -1497,7 +1497,7 @@ ZEND_FUNCTION(get_loaded_extensions) /* {{{ Return an array containing the names and values of all defined constants */ ZEND_FUNCTION(get_defined_constants) { - zend_bool categorize = 0; + bool categorize = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &categorize) == FAILURE) { RETURN_THROWS(); @@ -1666,7 +1666,7 @@ void debug_print_backtrace_args(zval *arg_array) /* {{{ */ } /* }}} */ -static inline zend_bool skip_internal_handler(zend_execute_data *skip) /* {{{ */ +static inline bool skip_internal_handler(zend_execute_data *skip) /* {{{ */ { return !(skip->func && ZEND_USER_CODE(skip->func->common.type)) && skip->prev_execute_data @@ -1778,7 +1778,7 @@ ZEND_FUNCTION(debug_print_backtrace) } } else { /* i know this is kinda ugly, but i'm trying to avoid extra cycles in the main execution loop */ - zend_bool build_filename_arg = 1; + bool build_filename_arg = 1; uint32_t include_kind = 0; if (ptr->func && ZEND_USER_CODE(ptr->func->common.type) && ptr->opline->opcode == ZEND_INCLUDE_OR_EVAL) { include_kind = ptr->opline->extended_value; @@ -2009,7 +2009,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int } } else { /* i know this is kinda ugly, but i'm trying to avoid extra cycles in the main execution loop */ - zend_bool build_filename_arg = 1; + bool build_filename_arg = 1; zend_string *pseudo_function_name; uint32_t include_kind = 0; if (ptr->func && ZEND_USER_CODE(ptr->func->common.type) && ptr->opline->opcode == ZEND_INCLUDE_OR_EVAL) { diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index d8358734ab..8aed8622dc 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -69,11 +69,11 @@ ZEND_METHOD(Closure, __invoke) /* {{{ */ } /* }}} */ -static zend_bool zend_valid_closure_binding( +static bool zend_valid_closure_binding( zend_closure *closure, zval *newthis, zend_class_entry *scope) /* {{{ */ { zend_function *func = &closure->func; - zend_bool is_fake_closure = (func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE) != 0; + bool is_fake_closure = (func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE) != 0; if (newthis) { if (func->common.fn_flags & ZEND_ACC_STATIC) { zend_error(E_WARNING, "Cannot bind an instance to a static closure"); @@ -520,7 +520,7 @@ static zend_object *zend_closure_clone(zend_object *zobject) /* {{{ */ } /* }}} */ -int zend_closure_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, zend_bool check_only) /* {{{ */ +int zend_closure_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, bool check_only) /* {{{ */ { zend_closure *closure = (zend_closure *)obj; *fptr_ptr = &closure->func; @@ -543,7 +543,7 @@ static HashTable *zend_closure_get_debug_info(zend_object *object, int *is_temp) zval val; struct _zend_arg_info *arg_info = closure->func.common.arg_info; HashTable *debug_info; - zend_bool zstr_args = (closure->func.type == ZEND_USER_FUNCTION) || (closure->func.common.fn_flags & ZEND_ACC_USER_ARG_INFO); + bool zstr_args = (closure->func.type == ZEND_USER_FUNCTION) || (closure->func.common.fn_flags & ZEND_ACC_USER_ARG_INFO); *is_temp = 1; diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 861e29ce63..58cd190b68 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -87,7 +87,7 @@ ZEND_API zend_executor_globals executor_globals; #endif static zend_op *zend_emit_op(znode *result, zend_uchar opcode, znode *op1, znode *op2); -static zend_bool zend_try_ct_eval_array(zval *result, zend_ast *ast); +static bool zend_try_ct_eval_array(zval *result, zend_ast *ast); static void init_op(zend_op *op) { @@ -145,7 +145,7 @@ static zend_string *zend_build_runtime_definition_key(zend_string *name, uint32_ } /* }}} */ -static zend_bool zend_get_unqualified_name(const zend_string *name, const char **result, size_t *result_len) /* {{{ */ +static bool zend_get_unqualified_name(const zend_string *name, const char **result, size_t *result_len) /* {{{ */ { const char *ns_separator = zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); if (ns_separator != NULL) { @@ -180,7 +180,7 @@ static const struct reserved_class_name reserved_class_names[] = { {NULL, 0} }; -static zend_bool zend_is_reserved_class_name(const zend_string *name) /* {{{ */ +static bool zend_is_reserved_class_name(const zend_string *name) /* {{{ */ { const struct reserved_class_name *reserved = reserved_class_names; @@ -259,7 +259,7 @@ static zend_always_inline zend_uchar zend_lookup_builtin_type_by_name(const zend } /* }}} */ -static zend_always_inline zend_bool zend_is_confusable_type(const zend_string *name, const char **correct_name) /* {{{ */ +static zend_always_inline bool zend_is_confusable_type(const zend_string *name, const char **correct_name) /* {{{ */ { const confusable_type_info *info = confusable_types; @@ -278,7 +278,7 @@ static zend_always_inline zend_bool zend_is_confusable_type(const zend_string *n } /* }}} */ -static zend_bool zend_is_not_imported(zend_string *name) { +static bool zend_is_not_imported(zend_string *name) { /* Assuming "name" is unqualified here. */ return !FC(imports) || zend_hash_find_ptr_lc(FC(imports), name) == NULL; } @@ -393,7 +393,7 @@ static void zend_register_seen_symbol(zend_string *name, uint32_t kind) { } } -static zend_bool zend_have_seen_symbol(zend_string *name, uint32_t kind) { +static bool zend_have_seen_symbol(zend_string *name, uint32_t kind) { zval *zv = zend_hash_find(&FC(seen_symbols), name); return zv && (Z_LVAL_P(zv) & kind) != 0; } @@ -472,7 +472,7 @@ ZEND_API int zend_get_compiled_lineno(void) /* {{{ */ } /* }}} */ -ZEND_API zend_bool zend_is_compiling(void) /* {{{ */ +ZEND_API bool zend_is_compiling(void) /* {{{ */ { return CG(in_compilation); } @@ -609,7 +609,7 @@ static int zend_add_class_name_literal(zend_string *name) /* {{{ */ } /* }}} */ -static int zend_add_const_name_literal(zend_string *name, zend_bool unqualified) /* {{{ */ +static int zend_add_const_name_literal(zend_string *name, bool unqualified) /* {{{ */ { zend_string *tmp_name; @@ -658,7 +658,7 @@ void zend_stop_lexing(void) } static inline void zend_begin_loop( - zend_uchar free_opcode, const znode *loop_var, zend_bool is_switch) /* {{{ */ + zend_uchar free_opcode, const znode *loop_var, bool is_switch) /* {{{ */ { zend_brk_cont_element *brk_cont_element; int parent = CG(context).current_brk_cont; @@ -860,8 +860,8 @@ zend_string *zend_prefix_with_ns(zend_string *name) { } zend_string *zend_resolve_non_class_name( - zend_string *name, uint32_t type, zend_bool *is_fully_qualified, - zend_bool case_sensitive, HashTable *current_import_sub + zend_string *name, uint32_t type, bool *is_fully_qualified, + bool case_sensitive, HashTable *current_import_sub ) { char *compound; *is_fully_qualified = 0; @@ -917,14 +917,14 @@ zend_string *zend_resolve_non_class_name( } /* }}} */ -zend_string *zend_resolve_function_name(zend_string *name, uint32_t type, zend_bool *is_fully_qualified) /* {{{ */ +zend_string *zend_resolve_function_name(zend_string *name, uint32_t type, bool *is_fully_qualified) /* {{{ */ { return zend_resolve_non_class_name( name, type, is_fully_qualified, 0, FC(imports_function)); } /* }}} */ -zend_string *zend_resolve_const_name(zend_string *name, uint32_t type, zend_bool *is_fully_qualified) /* {{{ */ { +zend_string *zend_resolve_const_name(zend_string *name, uint32_t type, bool *is_fully_qualified) /* {{{ */ { return zend_resolve_non_class_name( name, type, is_fully_qualified, 1, FC(imports_const)); } @@ -1001,7 +1001,7 @@ static void str_dtor(zval *zv) /* {{{ */ { } /* }}} */ -static zend_bool zend_is_call(zend_ast *ast); +static bool zend_is_call(zend_ast *ast); static uint32_t zend_add_try_element(uint32_t try_op) /* {{{ */ { @@ -1052,7 +1052,7 @@ ZEND_API void function_add_ref(zend_function *function) /* {{{ */ } /* }}} */ -static zend_never_inline ZEND_COLD ZEND_NORETURN void do_bind_function_error(zend_string *lcname, zend_op_array *op_array, zend_bool compile_time) /* {{{ */ +static zend_never_inline ZEND_COLD ZEND_NORETURN void do_bind_function_error(zend_string *lcname, zend_op_array *op_array, bool compile_time) /* {{{ */ { zval *zv = zend_hash_find_ex(compile_time ? CG(function_table) : EG(function_table), lcname, 1); int error_level = compile_time ? E_COMPILE_ERROR : E_ERROR; @@ -1246,7 +1246,7 @@ zend_string *zend_type_to_string_resolved(zend_type type, zend_class_entry *scop } if (type_mask & MAY_BE_NULL) { - zend_bool is_union = !str || memchr(ZSTR_VAL(str), '|', ZSTR_LEN(str)) != NULL; + bool is_union = !str || memchr(ZSTR_VAL(str), '|', ZSTR_LEN(str)) != NULL; if (!is_union) { zend_string *nullable_str = zend_string_concat2("?", 1, ZSTR_VAL(str), ZSTR_LEN(str)); zend_string_release(str); @@ -1262,7 +1262,7 @@ ZEND_API zend_string *zend_type_to_string(zend_type type) { return zend_type_to_string_resolved(type, NULL); } -static zend_bool is_generator_compatible_class_type(zend_string *name) { +static bool is_generator_compatible_class_type(zend_string *name) { return zend_string_equals_literal_ci(name, "Traversable") || zend_string_equals_literal_ci(name, "Iterator") || zend_string_equals_literal_ci(name, "Generator"); @@ -1277,7 +1277,7 @@ static void zend_mark_function_as_generator() /* {{{ */ if (CG(active_op_array)->fn_flags & ZEND_ACC_HAS_RETURN_TYPE) { zend_type return_type = CG(active_op_array)->arg_info[-1].type; - zend_bool valid_type = (ZEND_TYPE_FULL_MASK(return_type) & (MAY_BE_ITERABLE | MAY_BE_OBJECT)) != 0; + bool valid_type = (ZEND_TYPE_FULL_MASK(return_type) & (MAY_BE_ITERABLE | MAY_BE_OBJECT)) != 0; if (!valid_type) { zend_type *single_type; ZEND_TYPE_FOREACH(return_type, single_type) { @@ -1326,7 +1326,7 @@ ZEND_API uint32_t zend_build_delayed_early_binding_list(const zend_op_array *op_ ZEND_API void zend_do_delayed_early_binding(zend_op_array *op_array, uint32_t first_early_binding_opline) /* {{{ */ { if (first_early_binding_opline != (uint32_t)-1) { - zend_bool orig_in_compilation = CG(in_compilation); + bool orig_in_compilation = CG(in_compilation); uint32_t opline_num = first_early_binding_opline; void **run_time_cache; @@ -1433,7 +1433,7 @@ ZEND_API zend_result zend_unmangle_property_name_ex(const zend_string *name, con } /* }}} */ -static zend_bool can_ct_eval_const(zend_constant *c) { +static bool can_ct_eval_const(zend_constant *c) { if (ZEND_CONSTANT_FLAGS(c) & CONST_DEPRECATED) { return 0; } @@ -1450,7 +1450,7 @@ static zend_bool can_ct_eval_const(zend_constant *c) { return 0; } -static zend_bool zend_try_ct_eval_const(zval *zv, zend_string *name, zend_bool is_fully_qualified) /* {{{ */ +static bool zend_try_ct_eval_const(zval *zv, zend_string *name, bool is_fully_qualified) /* {{{ */ { zend_constant *c = zend_hash_find_ptr(EG(zend_constants), name); if (c && can_ct_eval_const(c)) { @@ -1477,7 +1477,7 @@ static zend_bool zend_try_ct_eval_const(zval *zv, zend_string *name, zend_bool i } /* }}} */ -static inline zend_bool zend_is_scope_known() /* {{{ */ +static inline bool zend_is_scope_known() /* {{{ */ { if (CG(active_op_array)->fn_flags & ZEND_ACC_CLOSURE) { /* Closures can be rebound to a different scope */ @@ -1495,7 +1495,7 @@ static inline zend_bool zend_is_scope_known() /* {{{ */ } /* }}} */ -static inline zend_bool class_name_refers_to_active_ce(zend_string *class_name, uint32_t fetch_type) /* {{{ */ +static inline bool class_name_refers_to_active_ce(zend_string *class_name, uint32_t fetch_type) /* {{{ */ { if (!CG(active_class_entry)) { return 0; @@ -1560,7 +1560,7 @@ static void zend_ensure_valid_class_fetch_type(uint32_t fetch_type) /* {{{ */ } /* }}} */ -static zend_bool zend_try_compile_const_expr_resolve_class_name(zval *zv, zend_ast *class_ast) /* {{{ */ +static bool zend_try_compile_const_expr_resolve_class_name(zval *zv, zend_ast *class_ast) /* {{{ */ { uint32_t fetch_type; zval *class_name; @@ -1603,7 +1603,7 @@ static zend_bool zend_try_compile_const_expr_resolve_class_name(zval *zv, zend_a /* }}} */ /* We don't use zend_verify_const_access because we need to deal with unlinked classes. */ -static zend_bool zend_verify_ct_const_access(zend_class_constant *c, zend_class_entry *scope) +static bool zend_verify_ct_const_access(zend_class_constant *c, zend_class_entry *scope) { if (Z_ACCESS_FLAGS(c->value) & ZEND_ACC_PUBLIC) { return 1; @@ -1632,7 +1632,7 @@ static zend_bool zend_verify_ct_const_access(zend_class_constant *c, zend_class_ } } -static zend_bool zend_try_ct_eval_class_const(zval *zv, zend_string *class_name, zend_string *name) /* {{{ */ +static bool zend_try_ct_eval_class_const(zval *zv, zend_string *class_name, zend_string *name) /* {{{ */ { uint32_t fetch_type = zend_get_class_fetch_type(class_name); zend_class_constant *cc; @@ -1733,7 +1733,7 @@ void zend_do_extended_fcall_end(void) /* {{{ */ } /* }}} */ -zend_bool zend_is_auto_global_str(const char *name, size_t len) /* {{{ */ { +bool zend_is_auto_global_str(const char *name, size_t len) /* {{{ */ { zend_auto_global *auto_global; if ((auto_global = zend_hash_str_find_ptr(CG(auto_globals), name, len)) != NULL) { @@ -1746,7 +1746,7 @@ zend_bool zend_is_auto_global_str(const char *name, size_t len) /* {{{ */ { } /* }}} */ -zend_bool zend_is_auto_global(zend_string *name) /* {{{ */ +bool zend_is_auto_global(zend_string *name) /* {{{ */ { zend_auto_global *auto_global; @@ -1760,7 +1760,7 @@ zend_bool zend_is_auto_global(zend_string *name) /* {{{ */ } /* }}} */ -zend_result zend_register_auto_global(zend_string *name, zend_bool jit, zend_auto_global_callback auto_global_callback) /* {{{ */ +zend_result zend_register_auto_global(zend_string *name, bool jit, zend_auto_global_callback auto_global_callback) /* {{{ */ { zend_auto_global auto_global; zend_result retval; @@ -1808,9 +1808,9 @@ int ZEND_FASTCALL zendlex(zend_parser_stack_elem *elem) /* {{{ */ } /* }}} */ -ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify_handlers) /* {{{ */ +ZEND_API void zend_initialize_class_data(zend_class_entry *ce, bool nullify_handlers) /* {{{ */ { - zend_bool persistent_hashes = ce->type == ZEND_INTERNAL_CLASS; + bool persistent_hashes = ce->type == ZEND_INTERNAL_CLASS; ce->refcount = 1; ce->ce_flags = ZEND_ACC_CONSTANTS_UPDATED; @@ -2243,7 +2243,7 @@ static zend_op *zend_delayed_compile_end(uint32_t offset) /* {{{ */ } /* }}} */ -static zend_bool zend_ast_kind_is_short_circuited(zend_ast_kind ast_kind) +static bool zend_ast_kind_is_short_circuited(zend_ast_kind ast_kind) { switch (ast_kind) { case ZEND_AST_DIM: @@ -2259,7 +2259,7 @@ static zend_bool zend_ast_kind_is_short_circuited(zend_ast_kind ast_kind) } } -static zend_bool zend_ast_is_short_circuited(const zend_ast *ast) +static bool zend_ast_is_short_circuited(const zend_ast *ast) { switch (ast->kind) { case ZEND_AST_DIM: @@ -2295,7 +2295,7 @@ static uint32_t zend_short_circuiting_checkpoint() static void zend_short_circuiting_commit(uint32_t checkpoint, znode *result, zend_ast *ast) { - zend_bool is_short_circuited = zend_ast_kind_is_short_circuited(ast->kind) + bool is_short_circuited = zend_ast_kind_is_short_circuited(ast->kind) || ast->kind == ZEND_AST_ISSET || ast->kind == ZEND_AST_EMPTY; if (!is_short_circuited) { ZEND_ASSERT(zend_stack_count(&CG(short_circuiting_opnums)) == checkpoint @@ -2382,7 +2382,7 @@ static size_t zend_type_get_num_classes(zend_type type) { } static void zend_emit_return_type_check( - znode *expr, zend_arg_info *return_info, zend_bool implicit) /* {{{ */ + znode *expr, zend_arg_info *return_info, bool implicit) /* {{{ */ { zend_type type = return_info->type; if (ZEND_TYPE_IS_SET(type)) { @@ -2439,7 +2439,7 @@ void zend_emit_final_return(bool return_one) /* {{{ */ { znode zn; zend_op *ret; - zend_bool returns_reference = (CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0; + bool returns_reference = (CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0; if ((CG(active_op_array)->fn_flags & ZEND_ACC_HAS_RETURN_TYPE) && !(CG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR)) { @@ -2458,7 +2458,7 @@ void zend_emit_final_return(bool return_one) /* {{{ */ } /* }}} */ -static inline zend_bool zend_is_variable(zend_ast *ast) /* {{{ */ +static inline bool zend_is_variable(zend_ast *ast) /* {{{ */ { return ast->kind == ZEND_AST_VAR || ast->kind == ZEND_AST_DIM @@ -2468,7 +2468,7 @@ static inline zend_bool zend_is_variable(zend_ast *ast) /* {{{ */ } /* }}} */ -static inline zend_bool zend_is_call(zend_ast *ast) /* {{{ */ +static inline bool zend_is_call(zend_ast *ast) /* {{{ */ { return ast->kind == ZEND_AST_CALL || ast->kind == ZEND_AST_METHOD_CALL @@ -2477,13 +2477,13 @@ static inline zend_bool zend_is_call(zend_ast *ast) /* {{{ */ } /* }}} */ -static inline zend_bool zend_is_variable_or_call(zend_ast *ast) /* {{{ */ +static inline bool zend_is_variable_or_call(zend_ast *ast) /* {{{ */ { return zend_is_variable(ast) || zend_is_call(ast); } /* }}} */ -static inline zend_bool zend_is_unticked_stmt(zend_ast *ast) /* {{{ */ +static inline bool zend_is_unticked_stmt(zend_ast *ast) /* {{{ */ { return ast->kind == ZEND_AST_STMT_LIST || ast->kind == ZEND_AST_LABEL || ast->kind == ZEND_AST_PROP_DECL || ast->kind == ZEND_AST_CLASS_CONST_GROUP @@ -2491,7 +2491,7 @@ static inline zend_bool zend_is_unticked_stmt(zend_ast *ast) /* {{{ */ } /* }}} */ -static inline zend_bool zend_can_write_to_variable(zend_ast *ast) /* {{{ */ +static inline bool zend_can_write_to_variable(zend_ast *ast) /* {{{ */ { while ( ast->kind == ZEND_AST_DIM @@ -2504,7 +2504,7 @@ static inline zend_bool zend_can_write_to_variable(zend_ast *ast) /* {{{ */ } /* }}} */ -static inline zend_bool zend_is_const_default_class_ref(zend_ast *name_ast) /* {{{ */ +static inline bool zend_is_const_default_class_ref(zend_ast *name_ast) /* {{{ */ { if (name_ast->kind != ZEND_AST_ZVAL) { return 0; @@ -2674,7 +2674,7 @@ static zend_op *zend_compile_simple_var_no_cv(znode *result, zend_ast *ast, uint } /* }}} */ -static zend_bool is_this_fetch(zend_ast *ast) /* {{{ */ +static bool is_this_fetch(zend_ast *ast) /* {{{ */ { if (ast->kind == ZEND_AST_VAR && ast->child[0]->kind == ZEND_AST_ZVAL) { zval *name = zend_ast_get_zval(ast->child[0]); @@ -2700,7 +2700,7 @@ static bool is_global_var_fetch(zend_ast *ast) return ast->kind == ZEND_AST_DIM && is_globals_fetch(ast->child[0]); } -static zend_bool this_guaranteed_exists() /* {{{ */ +static bool this_guaranteed_exists() /* {{{ */ { zend_op_array *op_array = CG(active_op_array); /* Instance methods always have a $this. @@ -2748,7 +2748,7 @@ static void zend_separate_if_call_and_write(znode *node, zend_ast *ast, uint32_t } /* }}} */ -zend_op *zend_delayed_compile_var(znode *result, zend_ast *ast, uint32_t type, zend_bool by_ref); +zend_op *zend_delayed_compile_var(znode *result, zend_ast *ast, uint32_t type, bool by_ref); void zend_compile_assign(znode *result, zend_ast *ast); static inline void zend_emit_assign_znode(zend_ast *var_ast, znode *value_node) /* {{{ */ @@ -2829,7 +2829,7 @@ static zend_op *zend_delayed_compile_prop(znode *result, zend_ast *ast, uint32_t znode obj_node, prop_node; zend_op *opline; - zend_bool nullsafe = ast->kind == ZEND_AST_NULLSAFE_PROP; + bool nullsafe = ast->kind == ZEND_AST_NULLSAFE_PROP; if (is_this_fetch(obj_ast)) { if (this_guaranteed_exists()) { @@ -2938,9 +2938,9 @@ static void zend_verify_list_assign_target(zend_ast *var_ast, zend_ast_attr arra static inline void zend_emit_assign_ref_znode(zend_ast *var_ast, znode *value_node); /* Propagate refs used on leaf elements to the surrounding list() structures. */ -static zend_bool zend_propagate_list_refs(zend_ast *ast) { /* {{{ */ +static bool zend_propagate_list_refs(zend_ast *ast) { /* {{{ */ zend_ast_list *list = zend_ast_get_list(ast); - zend_bool has_refs = 0; + bool has_refs = 0; uint32_t i; for (i = 0; i < list->children; ++i) { @@ -2964,8 +2964,8 @@ static void zend_compile_list_assign( { zend_ast_list *list = zend_ast_get_list(ast); uint32_t i; - zend_bool has_elems = 0; - zend_bool is_keyed = + bool has_elems = 0; + bool is_keyed = list->children > 0 && list->child[0] != NULL && list->child[0]->child[1] != NULL; if (list->children && expr_node->op_type == IS_CONST && Z_TYPE(expr_node->u.constant) == IS_STRING) { @@ -3073,7 +3073,7 @@ static void zend_ensure_writable_variable(const zend_ast *ast) /* {{{ */ /* }}} */ /* Detects $a... = $a pattern */ -zend_bool zend_is_assign_to_self(zend_ast *var_ast, zend_ast *expr_ast) /* {{{ */ +bool zend_is_assign_to_self(zend_ast *var_ast, zend_ast *expr_ast) /* {{{ */ { if (expr_ast->kind != ZEND_AST_VAR || expr_ast->child[0]->kind != ZEND_AST_ZVAL) { return 0; @@ -3090,7 +3090,7 @@ zend_bool zend_is_assign_to_self(zend_ast *var_ast, zend_ast *expr_ast) /* {{{ * { zend_string *name1 = zval_get_string(zend_ast_get_zval(var_ast->child[0])); zend_string *name2 = zval_get_string(zend_ast_get_zval(expr_ast->child[0])); - zend_bool result = zend_string_equals(name1, name2); + bool result = zend_string_equals(name1, name2); zend_string_release_ex(name1, 0); zend_string_release_ex(name2, 0); return result; @@ -3382,14 +3382,14 @@ uint32_t zend_compile_args( { zend_ast_list *args = zend_ast_get_list(ast); uint32_t i; - zend_bool uses_arg_unpack = 0; + bool uses_arg_unpack = 0; uint32_t arg_count = 0; /* number of arguments not including unpacks */ /* Whether named arguments are used syntactically, to enforce language level limitations. * May not actually use named argument passing. */ - zend_bool uses_named_args = 0; + bool uses_named_args = 0; /* Whether there may be any undef arguments due to the use of named arguments. */ - zend_bool may_have_undef = 0; + bool may_have_undef = 0; /* Whether there may be any extra named arguments collected into a variadic. */ *may_have_extra_named_args = 0; @@ -3633,10 +3633,10 @@ void zend_compile_call_common(znode *result, zend_ast *args_ast, zend_function * } /* }}} */ -zend_bool zend_compile_function_name(znode *name_node, zend_ast *name_ast) /* {{{ */ +bool zend_compile_function_name(znode *name_node, zend_ast *name_ast) /* {{{ */ { zend_string *orig_name = zend_ast_get_str(name_ast); - zend_bool is_fully_qualified; + bool is_fully_qualified; name_node->op_type = IS_CONST; ZVAL_STR(&name_node->u.constant, zend_resolve_function_name( @@ -3693,7 +3693,7 @@ void zend_compile_dynamic_call(znode *result, znode *name_node, zend_ast *args_a } /* }}} */ -static inline zend_bool zend_args_contain_unpack_or_named(zend_ast_list *args) /* {{{ */ +static inline bool zend_args_contain_unpack_or_named(zend_ast_list *args) /* {{{ */ { uint32_t i; for (i = 0; i < args->children; ++i) { @@ -3849,7 +3849,7 @@ zend_result zend_compile_func_ord(znode *result, zend_ast_list *args) /* {{{ */ /* We can only calculate the stack size for functions that have been fully compiled, otherwise * additional CV or TMP slots may still be added. This prevents the use of INIT_FCALL for * directly or indirectly recursive function calls. */ -static zend_bool fbc_is_finalized(zend_function *fbc) { +static bool fbc_is_finalized(zend_function *fbc) { return !ZEND_USER_CODE(fbc->type) || (fbc->common.fn_flags & ZEND_ACC_DONE_PASS_TWO); } @@ -3921,7 +3921,7 @@ zend_result zend_compile_func_cufa(znode *result, zend_ast_list *args, zend_stri && args->child[1]->child[1]->kind == ZEND_AST_ARG_LIST) { zend_string *orig_name = zend_ast_get_str(args->child[1]->child[0]); zend_ast_list *list = zend_ast_get_list(args->child[1]->child[1]); - zend_bool is_fully_qualified; + bool is_fully_qualified; zend_string *name = zend_resolve_function_name(orig_name, args->child[1]->child[0]->attr, &is_fully_qualified); if (zend_string_equals_literal_ci(name, "array_slice") @@ -4034,7 +4034,7 @@ static void zend_compile_assert(znode *result, zend_ast_list *args, zend_string static zend_result zend_compile_func_in_array(znode *result, zend_ast_list *args) /* {{{ */ { - zend_bool strict = 0; + bool strict = 0; znode array, needly; zend_op *opline; @@ -4044,7 +4044,7 @@ static zend_result zend_compile_func_in_array(znode *result, zend_ast_list *args } else if (args->child[2]->kind == ZEND_AST_CONST) { zval value; zend_ast *name_ast = args->child[2]->child[0]; - zend_bool is_fully_qualified; + bool is_fully_qualified; zend_string *resolved_name = zend_resolve_const_name( zend_ast_get_str(name_ast), name_ast->attr, &is_fully_qualified); @@ -4069,7 +4069,7 @@ static zend_result zend_compile_func_in_array(znode *result, zend_ast_list *args } if (zend_hash_num_elements(Z_ARRVAL(array.u.constant)) > 0) { - zend_bool ok = 1; + bool ok = 1; zval *val, tmp; HashTable *src = Z_ARRVAL(array.u.constant); HashTable *dst = zend_new_array(zend_hash_num_elements(src)); @@ -4226,7 +4226,7 @@ zend_result zend_compile_func_array_slice(znode *result, zend_ast_list *args) /* && args->child[1]->kind == ZEND_AST_ZVAL) { zend_string *orig_name = zend_ast_get_str(args->child[0]->child[0]); - zend_bool is_fully_qualified; + bool is_fully_qualified; zend_string *name = zend_resolve_function_name(orig_name, args->child[0]->child[0]->attr, &is_fully_qualified); zend_ast_list *list = zend_ast_get_list(args->child[0]->child[1]); zval *zv = zend_ast_get_zval(args->child[1]); @@ -4348,7 +4348,7 @@ void zend_compile_call(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ } { - zend_bool runtime_resolution = zend_compile_function_name(&name_node, name_ast); + bool runtime_resolution = zend_compile_function_name(&name_node, name_ast); if (runtime_resolution) { if (zend_string_equals_literal_ci(zend_ast_get_str(name_ast), "assert")) { zend_compile_assert(result, zend_ast_get_list(args_ast), Z_STR(name_node.u.constant), NULL); @@ -4414,7 +4414,7 @@ void zend_compile_method_call(znode *result, zend_ast *ast, uint32_t type) /* {{ znode obj_node, method_node; zend_op *opline; zend_function *fbc = NULL; - zend_bool nullsafe = ast->kind == ZEND_AST_NULLSAFE_METHOD_CALL; + bool nullsafe = ast->kind == ZEND_AST_NULLSAFE_METHOD_CALL; if (is_this_fetch(obj_ast)) { if (this_guaranteed_exists()) { @@ -4467,7 +4467,7 @@ void zend_compile_method_call(znode *result, zend_ast *ast, uint32_t type) /* {{ } /* }}} */ -static zend_bool zend_is_constructor(zend_string *name) /* {{{ */ +static bool zend_is_constructor(zend_string *name) /* {{{ */ { return zend_string_equals_literal_ci(name, ZEND_CONSTRUCTOR_FUNC_NAME); } @@ -4559,7 +4559,7 @@ void zend_compile_static_call(znode *result, zend_ast *ast, uint32_t type) /* {{ } /* }}} */ -void zend_compile_class_decl(znode *result, zend_ast *ast, zend_bool toplevel); +void zend_compile_class_decl(znode *result, zend_ast *ast, bool toplevel); void zend_compile_new(znode *result, zend_ast *ast) /* {{{ */ { @@ -4817,8 +4817,8 @@ static bool zend_has_finally(void) /* {{{ */ void zend_compile_return(zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; - zend_bool is_generator = (CG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) != 0; - zend_bool by_ref = (CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0; + bool is_generator = (CG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) != 0; + bool by_ref = (CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0; znode expr_node; zend_op *opline; @@ -5174,8 +5174,8 @@ void zend_compile_foreach(zend_ast *ast) /* {{{ */ zend_ast *value_ast = ast->child[1]; zend_ast *key_ast = ast->child[2]; zend_ast *stmt_ast = ast->child[3]; - zend_bool by_ref = value_ast->kind == ZEND_AST_REF; - zend_bool is_variable = zend_is_variable(expr_ast) && zend_can_write_to_variable(expr_ast); + bool by_ref = value_ast->kind == ZEND_AST_REF; + bool is_variable = zend_is_variable(expr_ast) && zend_can_write_to_variable(expr_ast); znode expr_node, reset_node, value_node, key_node; zend_op *opline; @@ -5344,7 +5344,7 @@ static zend_uchar determine_switch_jumptable_type(zend_ast_list *cases) { return common_type; } -static zend_bool should_use_jumptable(zend_ast_list *cases, zend_uchar jumptable_type) { +static bool should_use_jumptable(zend_ast_list *cases, zend_uchar jumptable_type) { if (CG(compiler_options) & ZEND_COMPILE_NO_JUMPTABLES) { return 0; } @@ -5365,7 +5365,7 @@ void zend_compile_switch(zend_ast *ast) /* {{{ */ zend_ast_list *cases = zend_ast_get_list(ast->child[1]); uint32_t i; - zend_bool has_default_case = 0; + bool has_default_case = 0; znode expr_node, case_node; zend_op *opline; @@ -5510,7 +5510,7 @@ static uint32_t count_match_conds(zend_ast_list *arms) return num_conds; } -static zend_bool can_match_use_jumptable(zend_ast_list *arms) { +static bool can_match_use_jumptable(zend_ast_list *arms) { for (uint32_t i = 0; i < arms->children; i++) { zend_ast *arm_ast = arms->child[i]; if (!arm_ast->child[0]) { @@ -5541,7 +5541,7 @@ void zend_compile_match(znode *result, zend_ast *ast) { zend_ast *expr_ast = ast->child[0]; zend_ast_list *arms = zend_ast_get_list(ast->child[1]); - zend_bool has_default_arm = 0; + bool has_default_arm = 0; uint32_t opnum_match = (uint32_t)-1; znode expr_node; @@ -5553,7 +5553,7 @@ void zend_compile_match(znode *result, zend_ast *ast) uint32_t num_conds = count_match_conds(arms); zend_uchar can_use_jumptable = can_match_use_jumptable(arms); - zend_bool uses_jumptable = can_use_jumptable && num_conds >= 2; + bool uses_jumptable = can_use_jumptable && num_conds >= 2; HashTable *jumptable = NULL; uint32_t *jmpnz_opnums = NULL; @@ -5619,7 +5619,7 @@ void zend_compile_match(znode *result, zend_ast *ast) opnum_default_jmp = zend_emit_jump(0); } - zend_bool is_first_case = 1; + bool is_first_case = 1; uint32_t cond_count = 0; uint32_t *jmp_end_opnums = safe_emalloc(sizeof(uint32_t), arms->children, 0); @@ -5778,7 +5778,7 @@ void zend_compile_try(zend_ast *ast) /* {{{ */ zend_ast *var_ast = catch_ast->child[1]; zend_ast *stmt_ast = catch_ast->child[2]; zend_string *var_name = var_ast ? zval_make_interned_string(zend_ast_get_zval(var_ast)) : NULL; - zend_bool is_last_catch = (i + 1 == catches->children); + bool is_last_catch = (i + 1 == catches->children); uint32_t *jmp_multicatch = safe_emalloc(sizeof(uint32_t), classes->children - 1, 0); uint32_t opnum_catch = (uint32_t)-1; @@ -5787,7 +5787,7 @@ void zend_compile_try(zend_ast *ast) /* {{{ */ for (j = 0; j < classes->children; j++) { zend_ast *class_ast = classes->child[j]; - zend_bool is_last_class = (j + 1 == classes->children); + bool is_last_class = (j + 1 == classes->children); if (!zend_is_const_default_class_ref(class_ast)) { zend_error_noreturn(E_COMPILE_ERROR, "Bad class name in the catch statement"); @@ -5894,7 +5894,7 @@ void zend_compile_try(zend_ast *ast) /* {{{ */ /* }}} */ /* Encoding declarations must already be handled during parsing */ -zend_bool zend_handle_encoding_declaration(zend_ast *ast) /* {{{ */ +bool zend_handle_encoding_declaration(zend_ast *ast) /* {{{ */ { zend_ast_list *declares = zend_ast_get_list(ast); uint32_t i; @@ -5946,7 +5946,7 @@ zend_bool zend_handle_encoding_declaration(zend_ast *ast) /* {{{ */ /* }}} */ /* Check whether this is the first statement, not counting declares. */ -static zend_result zend_is_first_statement(zend_ast *ast, zend_bool allow_nop) /* {{{ */ +static zend_result zend_is_first_statement(zend_ast *ast, bool allow_nop) /* {{{ */ { uint32_t i = 0; zend_ast_list *file_ast = zend_ast_get_list(CG(ast)); @@ -6122,7 +6122,7 @@ static zend_type zend_compile_single_typename(zend_ast *ast) } } -static zend_bool zend_type_contains_traversable(zend_type type) { +static bool zend_type_contains_traversable(zend_type type) { zend_type *single_type; ZEND_TYPE_FOREACH(type, single_type) { if (ZEND_TYPE_HAS_NAME(*single_type) @@ -6136,9 +6136,9 @@ static zend_bool zend_type_contains_traversable(zend_type type) { // TODO: Ideally we'd canonicalize "iterable" into "array|Traversable" and essentially // treat it as a built-in type alias. static zend_type zend_compile_typename( - zend_ast *ast, zend_bool force_allow_null) /* {{{ */ + zend_ast *ast, bool force_allow_null) /* {{{ */ { - zend_bool allow_null = force_allow_null; + bool allow_null = force_allow_null; zend_ast_attr orig_ast_attr = ast->attr; zend_type type = ZEND_TYPE_INIT_NONE(0); if (ast->attr & ZEND_TYPE_NULLABLE) { @@ -6263,7 +6263,7 @@ static zend_type zend_compile_typename( /* }}} */ /* May convert value from int to float. */ -static zend_bool zend_is_valid_default_value(zend_type type, zval *value) +static bool zend_is_valid_default_value(zend_type type, zval *value) { ZEND_ASSERT(ZEND_TYPE_IS_SET(type)); if (ZEND_TYPE_CONTAINS_CODE(type, Z_TYPE_P(value))) { @@ -6312,7 +6312,7 @@ static void zend_compile_attributes(HashTable **attributes, zend_ast *ast, uint3 if (args) { ZEND_ASSERT(args->kind == ZEND_AST_ARG_LIST); - zend_bool uses_named_args = 0; + bool uses_named_args = 0; for (j = 0; j < args->children; j++) { zend_ast **arg_ast_ptr = &args->child[j]; zend_ast *arg_ast = *arg_ast_ptr; @@ -6410,8 +6410,8 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32_t fall zend_ast *attributes_ast = param_ast->child[3]; zend_ast *doc_comment_ast = param_ast->child[4]; zend_string *name = zval_make_interned_string(zend_ast_get_zval(var_ast)); - zend_bool is_ref = (param_ast->attr & ZEND_PARAM_REF) != 0; - zend_bool is_variadic = (param_ast->attr & ZEND_PARAM_VARIADIC) != 0; + bool is_ref = (param_ast->attr & ZEND_PARAM_REF) != 0; + bool is_variadic = (param_ast->attr & ZEND_PARAM_VARIADIC) != 0; uint32_t visibility = param_ast->attr & (ZEND_ACC_PUBLIC|ZEND_ACC_PROTECTED|ZEND_ACC_PRIVATE); @@ -6460,7 +6460,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32_t fall if (!optional_param) { /* Ignore parameters of the form "Type $param = null". * This is the PHP 5 style way of writing "?Type $param", so allow it for now. */ - zend_bool is_implicit_nullable = + bool is_implicit_nullable = type_ast && Z_TYPE(default_node.u.constant) == IS_NULL; if (!is_implicit_nullable) { optional_param = name; @@ -6486,7 +6486,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32_t fall if (type_ast) { uint32_t default_type = *default_ast_ptr ? Z_TYPE(default_node.u.constant) : IS_UNDEF; - zend_bool force_nullable = default_type == IS_NULL && !visibility; + bool force_nullable = default_type == IS_NULL && !visibility; op_array->fn_flags |= ZEND_ACC_HAS_TYPE_HINTS; arg_info->type = zend_compile_typename(type_ast, force_nullable); @@ -6526,7 +6526,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32_t fall if (visibility) { zend_op_array *op_array = CG(active_op_array); zend_class_entry *scope = op_array->scope; - zend_bool is_ctor = + bool is_ctor = scope && zend_is_constructor(op_array->function_name); if (!is_ctor) { zend_error_noreturn(E_COMPILE_ERROR, @@ -6590,7 +6590,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32_t fall for (i = 0; i < list->children; i++) { zend_ast *param_ast = list->child[i]; - zend_bool is_ref = (param_ast->attr & ZEND_PARAM_REF) != 0; + bool is_ref = (param_ast->attr & ZEND_PARAM_REF) != 0; uint32_t visibility = param_ast->attr & (ZEND_ACC_PUBLIC|ZEND_ACC_PROTECTED|ZEND_ACC_PRIVATE); if (!visibility) { @@ -6660,7 +6660,7 @@ static void zend_compile_closure_binding(znode *closure, zend_op_array *op_array typedef struct { HashTable uses; - zend_bool varvars_used; + bool varvars_used; } closure_info; static void find_implicit_binds_recursively(closure_info *info, zend_ast *ast) { @@ -6816,10 +6816,10 @@ static void add_stringable_interface(zend_class_entry *ce) { zend_string_init("stringable", sizeof("stringable") - 1, 0); } -zend_string *zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_bool has_body) /* {{{ */ +zend_string *zend_begin_method_decl(zend_op_array *op_array, zend_string *name, bool has_body) /* {{{ */ { zend_class_entry *ce = CG(active_class_entry); - zend_bool in_interface = (ce->ce_flags & ZEND_ACC_INTERFACE) != 0; + bool in_interface = (ce->ce_flags & ZEND_ACC_INTERFACE) != 0; uint32_t fn_flags = op_array->fn_flags; zend_string *lcname; @@ -6873,7 +6873,7 @@ zend_string *zend_begin_method_decl(zend_op_array *op_array, zend_string *name, } /* }}} */ -static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_ast_decl *decl, zend_bool toplevel) /* {{{ */ +static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_ast_decl *decl, bool toplevel) /* {{{ */ { zend_string *unqualified_name, *name, *lcname, *key; zend_op *opline; @@ -6935,14 +6935,14 @@ static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_as } /* }}} */ -void zend_compile_func_decl(znode *result, zend_ast *ast, zend_bool toplevel) /* {{{ */ +void zend_compile_func_decl(znode *result, zend_ast *ast, bool toplevel) /* {{{ */ { zend_ast_decl *decl = (zend_ast_decl *) ast; zend_ast *params_ast = decl->child[0]; zend_ast *uses_ast = decl->child[1]; zend_ast *stmt_ast = decl->child[2]; zend_ast *return_type_ast = decl->child[3]; - zend_bool is_method = decl->kind == ZEND_AST_METHOD; + bool is_method = decl->kind == ZEND_AST_METHOD; zend_string *method_lcname; zend_class_entry *orig_class_entry = CG(active_class_entry); @@ -6976,7 +6976,7 @@ void zend_compile_func_decl(znode *result, zend_ast *ast, zend_bool toplevel) /* } if (is_method) { - zend_bool has_body = stmt_ast != NULL; + bool has_body = stmt_ast != NULL; method_lcname = zend_begin_method_decl(op_array, decl->name, has_body); } else { zend_begin_func_decl(result, op_array, decl, toplevel); @@ -7357,7 +7357,7 @@ static zend_string *zend_generate_anon_class_name(zend_ast_decl *decl) return zend_new_interned_string(result); } -void zend_compile_class_decl(znode *result, zend_ast *ast, zend_bool toplevel) /* {{{ */ +void zend_compile_class_decl(znode *result, zend_ast *ast, bool toplevel) /* {{{ */ { zend_ast_decl *decl = (zend_ast_decl *) ast; zend_ast *extends_ast = decl->child[0]; @@ -7596,7 +7596,7 @@ void zend_compile_use(zend_ast *ast) /* {{{ */ zend_string *current_ns = FC(current_namespace); uint32_t type = ast->attr; HashTable *current_import = zend_get_import_ht(type); - zend_bool case_sensitive = type == ZEND_SYMBOL_CONST; + bool case_sensitive = type == ZEND_SYMBOL_CONST; for (i = 0; i < list->children; ++i) { zend_ast *use_ast = list->child[i]; @@ -7730,7 +7730,7 @@ void zend_compile_namespace(zend_ast *ast) /* {{{ */ zend_ast *name_ast = ast->child[0]; zend_ast *stmt_ast = ast->child[1]; zend_string *name; - zend_bool with_bracket = stmt_ast != NULL; + bool with_bracket = stmt_ast != NULL; /* handle mixed syntax declaration or nested namespaces */ if (!FC(has_bracketed_namespaces)) { @@ -7751,7 +7751,7 @@ void zend_compile_namespace(zend_ast *ast) /* {{{ */ } } - zend_bool is_first_namespace = (!with_bracket && !FC(current_namespace)) + bool is_first_namespace = (!with_bracket && !FC(current_namespace)) || (with_bracket && !FC(has_bracketed_namespaces)); if (is_first_namespace && FAILURE == zend_is_first_statement(ast, /* allow_nop */ 1)) { zend_error_noreturn(E_COMPILE_ERROR, "Namespace declaration statement has to be " @@ -7810,7 +7810,7 @@ void zend_compile_halt_compiler(zend_ast *ast) /* {{{ */ } /* }}} */ -static zend_bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast) /* {{{ */ +static bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast) /* {{{ */ { zend_op_array *op_array = CG(active_op_array); zend_class_entry *ce = CG(active_class_entry); @@ -7901,7 +7901,7 @@ static zend_bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast) /* {{{ */ } /* }}} */ -ZEND_API zend_bool zend_binary_op_produces_error(uint32_t opcode, zval *op1, zval *op2) /* {{{ */ +ZEND_API bool zend_binary_op_produces_error(uint32_t opcode, zval *op1, zval *op2) /* {{{ */ { if ((opcode == ZEND_CONCAT || opcode == ZEND_FAST_CONCAT)) { /* Array to string warning. */ @@ -7956,7 +7956,7 @@ ZEND_API zend_bool zend_binary_op_produces_error(uint32_t opcode, zval *op1, zva } /* }}} */ -static inline zend_bool zend_try_ct_eval_binary_op(zval *result, uint32_t opcode, zval *op1, zval *op2) /* {{{ */ +static inline bool zend_try_ct_eval_binary_op(zval *result, uint32_t opcode, zval *op1, zval *op2) /* {{{ */ { if (zend_binary_op_produces_error(opcode, op1, op2)) { return 0; @@ -7968,7 +7968,7 @@ static inline zend_bool zend_try_ct_eval_binary_op(zval *result, uint32_t opcode } /* }}} */ -zend_bool zend_unary_op_produces_error(uint32_t opcode, zval *op) +bool zend_unary_op_produces_error(uint32_t opcode, zval *op) { if (opcode == ZEND_BW_NOT) { return Z_TYPE_P(op) <= IS_TRUE || Z_TYPE_P(op) == IS_ARRAY; @@ -7977,7 +7977,7 @@ zend_bool zend_unary_op_produces_error(uint32_t opcode, zval *op) return 0; } -static inline zend_bool zend_try_ct_eval_unary_op(zval *result, uint32_t opcode, zval *op) /* {{{ */ +static inline bool zend_try_ct_eval_unary_op(zval *result, uint32_t opcode, zval *op) /* {{{ */ { if (zend_unary_op_produces_error(opcode, op)) { return 0; @@ -7989,7 +7989,7 @@ static inline zend_bool zend_try_ct_eval_unary_op(zval *result, uint32_t opcode, } /* }}} */ -static inline zend_bool zend_try_ct_eval_unary_pm(zval *result, zend_ast_kind kind, zval *op) /* {{{ */ +static inline bool zend_try_ct_eval_unary_pm(zval *result, zend_ast_kind kind, zval *op) /* {{{ */ { zval right; ZVAL_LONG(&right, (kind == ZEND_AST_UNARY_PLUS) ? 1 : -1); @@ -8005,12 +8005,12 @@ static inline void zend_ct_eval_greater(zval *result, zend_ast_kind kind, zval * } /* }}} */ -static zend_bool zend_try_ct_eval_array(zval *result, zend_ast *ast) /* {{{ */ +static bool zend_try_ct_eval_array(zval *result, zend_ast *ast) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); zend_ast *last_elem_ast = NULL; uint32_t i; - zend_bool is_constant = 1; + bool is_constant = 1; if (ast->attr == ZEND_ARRAY_SYNTAX_LIST) { zend_error(E_COMPILE_ERROR, "Cannot use list() as standalone expression"); @@ -8536,7 +8536,7 @@ void zend_compile_assign_coalesce(znode *result, zend_ast *ast) /* {{{ */ znode var_node_is, var_node_w, default_node, assign_node, *node; zend_op *opline; uint32_t coalesce_opnum; - zend_bool need_frees = 0; + bool need_frees = 0; /* Remember expressions compiled during the initial BP_VAR_IS lookup, * to avoid double-evaluation when we compile again with BP_VAR_W. */ @@ -8666,7 +8666,7 @@ void zend_compile_yield(znode *result, zend_ast *ast) /* {{{ */ znode value_node, key_node; znode *value_node_ptr = NULL, *key_node_ptr = NULL; zend_op *opline; - zend_bool returns_by_ref = (CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0; + bool returns_by_ref = (CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0; zend_mark_function_as_generator(); @@ -8875,7 +8875,7 @@ void zend_compile_array(znode *result, zend_ast *ast) /* {{{ */ zend_ast_list *list = zend_ast_get_list(ast); zend_op *opline; uint32_t i, opnum_init = -1; - zend_bool packed = 1; + bool packed = 1; if (zend_try_ct_eval_array(&result->u.constant, ast)) { result->op_type = IS_CONST; @@ -8888,7 +8888,7 @@ void zend_compile_array(znode *result, zend_ast *ast) /* {{{ */ for (i = 0; i < list->children; ++i) { zend_ast *elem_ast = list->child[i]; zend_ast *value_ast, *key_ast; - zend_bool by_ref; + bool by_ref; znode value_node, key_node, *key_node_ptr = NULL; if (elem_ast == NULL) { @@ -8955,7 +8955,7 @@ void zend_compile_const(znode *result, zend_ast *ast) /* {{{ */ zend_op *opline; - zend_bool is_fully_qualified; + bool is_fully_qualified; zend_string *orig_name = zend_ast_get_str(name_ast); zend_string *resolved_name = zend_resolve_const_name(orig_name, name_ast->attr, &is_fully_qualified); @@ -9232,7 +9232,7 @@ void zend_compile_magic_const(znode *result, zend_ast *ast) /* {{{ */ } /* }}} */ -zend_bool zend_is_allowed_in_const_expr(zend_ast_kind kind) /* {{{ */ +bool zend_is_allowed_in_const_expr(zend_ast_kind kind) /* {{{ */ { return kind == ZEND_AST_ZVAL || kind == ZEND_AST_BINARY_OP || kind == ZEND_AST_GREATER || kind == ZEND_AST_GREATER_EQUAL @@ -9319,7 +9319,7 @@ void zend_compile_const_expr_const(zend_ast **ast_ptr) /* {{{ */ zend_ast *ast = *ast_ptr; zend_ast *name_ast = ast->child[0]; zend_string *orig_name = zend_ast_get_str(name_ast); - zend_bool is_fully_qualified; + bool is_fully_qualified; zval result; zend_string *resolved_name; @@ -9740,7 +9740,7 @@ zend_op *zend_compile_var(znode *result, zend_ast *ast, uint32_t type, bool by_r return opcode; } -zend_op *zend_delayed_compile_var(znode *result, zend_ast *ast, uint32_t type, zend_bool by_ref) /* {{{ */ +zend_op *zend_delayed_compile_var(znode *result, zend_ast *ast, uint32_t type, bool by_ref) /* {{{ */ { switch (ast->kind) { case ZEND_AST_VAR: @@ -9801,7 +9801,7 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */ case ZEND_AST_AND: case ZEND_AST_OR: { - zend_bool child0_is_true, child1_is_true; + bool child0_is_true, child1_is_true; zend_eval_const_expr(&ast->child[0]); zend_eval_const_expr(&ast->child[1]); if (ast->child[0]->kind != ZEND_AST_ZVAL) { @@ -9975,7 +9975,7 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */ case ZEND_AST_CONST: { zend_ast *name_ast = ast->child[0]; - zend_bool is_fully_qualified; + bool is_fully_qualified; zend_string *resolved_name = zend_resolve_const_name( zend_ast_get_str(name_ast), name_ast->attr, &is_fully_qualified); diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index b4af5d9e3f..9f76c78f0d 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -107,8 +107,8 @@ typedef struct _zend_file_context { zend_declarables declarables; zend_string *current_namespace; - zend_bool in_namespace; - zend_bool has_bracketed_namespaces; + bool in_namespace; + bool has_bracketed_namespaces; HashTable *imports; HashTable *imports_function; @@ -158,7 +158,7 @@ typedef struct _zend_brk_cont_element { int cont; int brk; int parent; - zend_bool is_switch; + bool is_switch; } zend_brk_cont_element; typedef struct _zend_label { @@ -765,7 +765,7 @@ zend_ast *zend_ast_append_str(zend_ast *left, zend_ast *right); zend_ast *zend_negate_num_string(zend_ast *ast); uint32_t zend_add_class_modifier(uint32_t flags, uint32_t new_flag); uint32_t zend_add_member_modifier(uint32_t flags, uint32_t new_flag); -zend_bool zend_handle_encoding_declaration(zend_ast *ast); +bool zend_handle_encoding_declaration(zend_ast *ast); /* parser-driven code generators */ void zend_do_free(znode *op1); @@ -803,7 +803,7 @@ ZEND_API void destroy_op_array(zend_op_array *op_array); ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle); ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce); ZEND_API void zend_cleanup_internal_classes(void); -ZEND_API void zend_type_release(zend_type type, zend_bool persistent); +ZEND_API void zend_type_release(zend_type type, bool persistent); ZEND_API zend_string *zend_create_member_string(zend_string *class_name, zend_string *member_name); @@ -837,30 +837,30 @@ static zend_always_inline const char *zend_get_unmangled_property_name(const zen #define ZEND_FUNCTION_DTOR zend_function_dtor #define ZEND_CLASS_DTOR destroy_zend_class -typedef zend_bool (*zend_needs_live_range_cb)(zend_op_array *op_array, zend_op *opline); +typedef bool (*zend_needs_live_range_cb)(zend_op_array *op_array, zend_op *opline); ZEND_API void zend_recalc_live_ranges( zend_op_array *op_array, zend_needs_live_range_cb needs_live_range); ZEND_API void pass_two(zend_op_array *op_array); -ZEND_API zend_bool zend_is_compiling(void); +ZEND_API bool zend_is_compiling(void); ZEND_API char *zend_make_compiled_string_description(const char *name); -ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify_handlers); +ZEND_API void zend_initialize_class_data(zend_class_entry *ce, bool nullify_handlers); uint32_t zend_get_class_fetch_type(zend_string *name); ZEND_API zend_uchar zend_get_call_op(const zend_op *init_op, zend_function *fbc); ZEND_API bool zend_is_smart_branch(const zend_op *opline); -typedef zend_bool (*zend_auto_global_callback)(zend_string *name); +typedef bool (*zend_auto_global_callback)(zend_string *name); typedef struct _zend_auto_global { zend_string *name; zend_auto_global_callback auto_global_callback; - zend_bool jit; - zend_bool armed; + bool jit; + bool armed; } zend_auto_global; -ZEND_API zend_result zend_register_auto_global(zend_string *name, zend_bool jit, zend_auto_global_callback auto_global_callback); +ZEND_API zend_result zend_register_auto_global(zend_string *name, bool jit, zend_auto_global_callback auto_global_callback); ZEND_API void zend_activate_auto_globals(void); -ZEND_API zend_bool zend_is_auto_global(zend_string *name); -ZEND_API zend_bool zend_is_auto_global_str(const char *name, size_t len); +ZEND_API bool zend_is_auto_global(zend_string *name); +ZEND_API bool zend_is_auto_global_str(const char *name, size_t len); ZEND_API size_t zend_dirname(char *path, size_t len); ZEND_API void zend_set_function_arg_flags(zend_function *func); @@ -1131,6 +1131,6 @@ END_EXTERN_C() /* The default value for CG(compiler_options) during eval() */ #define ZEND_COMPILE_DEFAULT_FOR_EVAL 0 -ZEND_API zend_bool zend_binary_op_produces_error(uint32_t opcode, zval *op1, zval *op2); +ZEND_API bool zend_binary_op_produces_error(uint32_t opcode, zval *op1, zval *op2); #endif /* ZEND_COMPILE_H */ diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index f289cc5d91..03ab10b523 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -158,7 +158,7 @@ ZEND_API void zend_register_null_constant(const char *name, size_t name_len, int zend_register_constant(&c); } -ZEND_API void zend_register_bool_constant(const char *name, size_t name_len, zend_bool bval, int flags, int module_number) +ZEND_API void zend_register_bool_constant(const char *name, size_t name_len, bool bval, int flags, int module_number) { zend_constant c; @@ -482,7 +482,7 @@ ZEND_API zend_result zend_register_constant(zend_constant *c) zend_string *lowercase_name = NULL; zend_string *name; zend_result ret = SUCCESS; - zend_bool persistent = (ZEND_CONSTANT_FLAGS(c) & CONST_PERSISTENT) != 0; + bool persistent = (ZEND_CONSTANT_FLAGS(c) & CONST_PERSISTENT) != 0; #if 0 printf("Registering constant for module %d\n", c->module_number); diff --git a/Zend/zend_constants.h b/Zend/zend_constants.h index 0a3c5a7377..0723514447 100644 --- a/Zend/zend_constants.h +++ b/Zend/zend_constants.h @@ -76,7 +76,7 @@ ZEND_API bool zend_verify_const_access(zend_class_constant *c, zend_class_entry ZEND_API zval *zend_get_constant(zend_string *name); ZEND_API zval *zend_get_constant_str(const char *name, size_t name_len); ZEND_API zval *zend_get_constant_ex(zend_string *name, zend_class_entry *scope, uint32_t flags); -ZEND_API void zend_register_bool_constant(const char *name, size_t name_len, zend_bool bval, int flags, int module_number); +ZEND_API void zend_register_bool_constant(const char *name, size_t name_len, bool bval, int flags, int module_number); ZEND_API void zend_register_null_constant(const char *name, size_t name_len, int flags, int module_number); ZEND_API void zend_register_long_constant(const char *name, size_t name_len, zend_long lval, int flags, int module_number); ZEND_API void zend_register_double_constant(const char *name, size_t name_len, double dval, int flags, int module_number); diff --git a/Zend/zend_cpuinfo.c b/Zend/zend_cpuinfo.c index 529ab529a3..bd4dcf298f 100644 --- a/Zend/zend_cpuinfo.c +++ b/Zend/zend_cpuinfo.c @@ -90,7 +90,7 @@ static unsigned get_xcr0_eax() { # endif } -static zend_bool is_avx_supported() { +static bool is_avx_supported() { if (!(cpuinfo.ecx & ZEND_CPU_FEATURE_AVX)) { /* No support for AVX */ return 0; @@ -106,7 +106,7 @@ static zend_bool is_avx_supported() { return 1; } #else -static zend_bool is_avx_supported() { +static bool is_avx_supported() { return 0; } #endif diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 59c62ada7a..e93526689d 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -144,7 +144,7 @@ void zend_exception_restore(void) /* {{{ */ } /* }}} */ -static zend_always_inline zend_bool is_handle_exception_set() { +static zend_always_inline bool is_handle_exception_set() { zend_execute_data *execute_data = EG(current_execute_data); return !execute_data->func || !ZEND_USER_CODE(execute_data->func->common.type) @@ -339,7 +339,7 @@ ZEND_METHOD(ErrorException, __construct) { zend_string *message = NULL, *filename = NULL; zend_long code = 0, severity = E_ERROR, lineno; - zend_bool lineno_is_null = 1; + bool lineno_is_null = 1; zval tmp, *object, *previous = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|SllS!l!O!", &message, &code, &severity, &filename, &lineno, &lineno_is_null, &previous, zend_ce_throwable) == FAILURE) { @@ -1017,7 +1017,7 @@ ZEND_API ZEND_COLD void zend_throw_unwind_exit(void) EG(current_execute_data)->opline = EG(exception_op); } -ZEND_API zend_bool zend_is_unwind_exit(zend_object *ex) +ZEND_API bool zend_is_unwind_exit(zend_object *ex) { return ex->ce == &zend_ce_unwind_exit; } diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h index 9d0c18a6da..74724c2424 100644 --- a/Zend/zend_exceptions.h +++ b/Zend/zend_exceptions.h @@ -70,7 +70,7 @@ extern ZEND_API void (*zend_throw_exception_hook)(zend_object *ex); ZEND_API ZEND_COLD zend_result zend_exception_error(zend_object *exception, int severity); ZEND_API ZEND_COLD void zend_throw_unwind_exit(void); -ZEND_API zend_bool zend_is_unwind_exit(zend_object *ex); +ZEND_API bool zend_is_unwind_exit(zend_object *ex); #include "zend_globals.h" diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index e035523589..3ac1535734 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -716,12 +716,12 @@ ZEND_API ZEND_COLD void zend_verify_arg_error( zend_string_release(need_msg); } -static zend_bool zend_verify_weak_scalar_type_hint(uint32_t type_mask, zval *arg) +static bool zend_verify_weak_scalar_type_hint(uint32_t type_mask, zval *arg) { zend_long lval; double dval; zend_string *str; - zend_bool bval; + bool bval; /* Type preference order: int -> float -> string -> bool */ if (type_mask & MAY_BE_LONG) { @@ -775,11 +775,11 @@ static bool can_convert_to_string(zval *zv) { } /* Used to sanity-check internal arginfo types without performing any actual type conversions. */ -static zend_bool zend_verify_weak_scalar_type_hint_no_sideeffect(uint32_t type_mask, zval *arg) +static bool zend_verify_weak_scalar_type_hint_no_sideeffect(uint32_t type_mask, zval *arg) { zend_long lval; double dval; - zend_bool bval; + bool bval; if ((type_mask & MAY_BE_LONG) && zend_parse_arg_long_weak(arg, &lval)) { return 1; @@ -797,7 +797,7 @@ static zend_bool zend_verify_weak_scalar_type_hint_no_sideeffect(uint32_t type_m } #endif -ZEND_API zend_bool zend_verify_scalar_type_hint(uint32_t type_mask, zval *arg, zend_bool strict, zend_bool is_internal_arg) +ZEND_API bool zend_verify_scalar_type_hint(uint32_t type_mask, zval *arg, bool strict, bool is_internal_arg) { if (UNEXPECTED(strict)) { /* SSTH Exception: IS_LONG may be accepted as IS_DOUBLE (converted) */ @@ -851,7 +851,7 @@ static zend_class_entry *resolve_single_class_type(zend_string *name, zend_class } } -static zend_bool zend_check_and_resolve_property_class_type( +static bool zend_check_and_resolve_property_class_type( zend_property_info *info, zend_class_entry *object_ce) { zend_class_entry *ce; if (ZEND_TYPE_HAS_LIST(info->type)) { @@ -890,7 +890,7 @@ static zend_bool zend_check_and_resolve_property_class_type( } } -static zend_always_inline zend_bool i_zend_check_property_type(zend_property_info *info, zval *property, zend_bool strict) +static zend_always_inline bool i_zend_check_property_type(zend_property_info *info, zval *property, bool strict) { ZEND_ASSERT(!Z_ISREF_P(property)); if (EXPECTED(ZEND_TYPE_CONTAINS_CODE(info->type, Z_TYPE_P(property)))) { @@ -910,7 +910,7 @@ static zend_always_inline zend_bool i_zend_check_property_type(zend_property_inf return zend_verify_scalar_type_hint(type_mask, property, strict, 0); } -static zend_always_inline zend_bool i_zend_verify_property_type(zend_property_info *info, zval *property, zend_bool strict) +static zend_always_inline bool i_zend_verify_property_type(zend_property_info *info, zval *property, bool strict) { if (i_zend_check_property_type(info, property, strict)) { return 1; @@ -920,7 +920,7 @@ static zend_always_inline zend_bool i_zend_verify_property_type(zend_property_in return 0; } -ZEND_API zend_bool zend_never_inline zend_verify_property_type(zend_property_info *info, zval *property, zend_bool strict) { +ZEND_API bool zend_never_inline zend_verify_property_type(zend_property_info *info, zval *property, bool strict) { return i_zend_verify_property_type(info, property, strict); } @@ -939,7 +939,7 @@ static zend_never_inline zval* zend_assign_to_typed_prop(zend_property_info *inf return zend_assign_to_variable(property_val, &tmp, IS_TMP_VAR, EX_USES_STRICT_TYPES()); } -ZEND_API zend_bool zend_value_instanceof_static(zval *zv) { +ZEND_API bool zend_value_instanceof_static(zval *zv) { if (Z_TYPE_P(zv) != IS_OBJECT) { return 0; } @@ -959,9 +959,9 @@ ZEND_API zend_bool zend_value_instanceof_static(zval *zv) { # define HAVE_CACHE_SLOT 1 #endif -static zend_always_inline zend_bool zend_check_type_slow( +static zend_always_inline bool zend_check_type_slow( zend_type type, zval *arg, zend_reference *ref, void **cache_slot, zend_class_entry *scope, - zend_bool is_return_type, zend_bool is_internal) + bool is_return_type, bool is_internal) { uint32_t type_mask; if (ZEND_TYPE_HAS_CLASS(type) && Z_TYPE_P(arg) == IS_OBJECT) { @@ -1039,9 +1039,9 @@ builtin_types: * because this case is already checked at compile-time. */ } -static zend_always_inline zend_bool zend_check_type( +static zend_always_inline bool zend_check_type( zend_type type, zval *arg, void **cache_slot, zend_class_entry *scope, - zend_bool is_return_type, zend_bool is_internal) + bool is_return_type, bool is_internal) { zend_reference *ref = NULL; ZEND_ASSERT(ZEND_TYPE_IS_SET(type)); @@ -1115,7 +1115,7 @@ static zend_never_inline ZEND_ATTRIBUTE_UNUSED bool zend_verify_internal_arg_typ /* Determine whether an internal call should throw, because the passed arguments violate * an arginfo constraint. This is only checked in debug builds. In release builds, we * trust that arginfo matches what is enforced by zend_parse_parameters. */ -static zend_always_inline zend_bool zend_internal_call_should_throw(zend_function *fbc, zend_execute_data *call) +static zend_always_inline bool zend_internal_call_should_throw(zend_function *fbc, zend_execute_data *call) { if (fbc->internal_function.handler == ZEND_FN(pass)) { /* Be lenient about the special pass function. */ @@ -2552,7 +2552,7 @@ str_offset: } } -static zend_never_inline zend_bool ZEND_FASTCALL zend_array_key_exists_fast(HashTable *ht, zval *key OPLINE_DC EXECUTE_DATA_DC) +static zend_never_inline bool ZEND_FASTCALL zend_array_key_exists_fast(HashTable *ht, zval *key OPLINE_DC EXECUTE_DATA_DC) { zend_string *str; zend_ulong hval; @@ -2612,12 +2612,12 @@ static ZEND_COLD void ZEND_FASTCALL zend_array_key_exists_error( } } -static zend_always_inline zend_bool promotes_to_array(zval *val) { +static zend_always_inline bool promotes_to_array(zval *val) { return Z_TYPE_P(val) <= IS_FALSE || (Z_ISREF_P(val) && Z_TYPE_P(Z_REFVAL_P(val)) <= IS_FALSE); } -static zend_always_inline zend_bool check_type_array_assignable(zend_type type) { +static zend_always_inline bool check_type_array_assignable(zend_type type) { if (!ZEND_TYPE_IS_SET(type)) { return 1; } @@ -2625,7 +2625,7 @@ static zend_always_inline zend_bool check_type_array_assignable(zend_type type) } /* Checks whether an array can be assigned to the reference. Throws error if not assignable. */ -ZEND_API zend_bool zend_verify_ref_array_assignable(zend_reference *ref) { +ZEND_API bool zend_verify_ref_array_assignable(zend_reference *ref) { zend_property_info *prop; ZEND_ASSERT(ZEND_REF_HAS_TYPE_SOURCES(ref)); ZEND_REF_FOREACH_TYPE_SOURCES(ref, prop) { @@ -2653,7 +2653,7 @@ static zend_property_info *zend_object_fetch_property_type_info( return zend_get_typed_property_info_for_slot(obj, slot); } -static zend_never_inline zend_bool zend_handle_fetch_obj_flags( +static zend_never_inline bool zend_handle_fetch_obj_flags( zval *result, zval *ptr, zend_object *obj, zend_property_info *prop_info, uint32_t flags) { switch (flags) { @@ -2698,7 +2698,7 @@ static zend_never_inline zend_bool zend_handle_fetch_obj_flags( return 1; } -static zend_always_inline void zend_fetch_property_address(zval *result, zval *container, uint32_t container_op_type, zval *prop_ptr, uint32_t prop_op_type, void **cache_slot, int type, uint32_t flags, zend_bool init_undef OPLINE_DC EXECUTE_DATA_DC) +static zend_always_inline void zend_fetch_property_address(zval *result, zval *container, uint32_t container_op_type, zval *prop_ptr, uint32_t prop_op_type, void **cache_slot, int type, uint32_t flags, bool init_undef OPLINE_DC EXECUTE_DATA_DC) { zval *ptr; zend_object *zobj; @@ -3039,7 +3039,7 @@ ZEND_API ZEND_COLD void zend_throw_conflicting_coercion_error(zend_property_info /* 1: valid, 0: invalid, -1: may be valid after type coercion */ static zend_always_inline int i_zend_verify_type_assignable_zval( - zend_property_info *info, zval *zv, zend_bool strict) { + zend_property_info *info, zval *zv, bool strict) { zend_type type = info->type; uint32_t type_mask; zend_uchar zv_type = Z_TYPE_P(zv); @@ -3082,7 +3082,7 @@ static zend_always_inline int i_zend_verify_type_assignable_zval( return -1; } -ZEND_API zend_bool ZEND_FASTCALL zend_verify_ref_assignable_zval(zend_reference *ref, zval *zv, zend_bool strict) +ZEND_API bool ZEND_FASTCALL zend_verify_ref_assignable_zval(zend_reference *ref, zval *zv, bool strict) { zend_property_info *prop; @@ -3161,9 +3161,9 @@ static zend_always_inline void i_zval_ptr_dtor_noref(zval *zval_ptr) { } } -ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, zend_uchar value_type, zend_bool strict) +ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, zend_uchar value_type, bool strict) { - zend_bool ret; + bool ret; zval value; zend_refcounted *ref = NULL; @@ -3194,7 +3194,7 @@ ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, ze return variable_ptr; } -ZEND_API zend_bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref(zend_property_info *prop_info, zval *orig_val, zend_bool strict) { +ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref(zend_property_info *prop_info, zval *orig_val, bool strict) { zval *val = orig_val; if (Z_ISREF_P(val) && ZEND_REF_HAS_TYPE_SOURCES(Z_REF_P(val))) { int result; @@ -3501,7 +3501,7 @@ static zend_always_inline void zend_init_cvs(uint32_t first, uint32_t last EXECU } } -static zend_always_inline void i_init_func_execute_data(zend_op_array *op_array, zval *return_value, zend_bool may_be_trampoline EXECUTE_DATA_DC) /* {{{ */ +static zend_always_inline void i_init_func_execute_data(zend_op_array *op_array, zval *return_value, bool may_be_trampoline EXECUTE_DATA_DC) /* {{{ */ { uint32_t first_extra_arg, num_args; ZEND_ASSERT(EX(func) == (zend_function*)op_array); @@ -4238,11 +4238,11 @@ already_compiled: } /* }}} */ -static zend_never_inline zend_bool ZEND_FASTCALL zend_fe_reset_iterator(zval *array_ptr, int by_ref OPLINE_DC EXECUTE_DATA_DC) /* {{{ */ +static zend_never_inline bool ZEND_FASTCALL zend_fe_reset_iterator(zval *array_ptr, int by_ref OPLINE_DC EXECUTE_DATA_DC) /* {{{ */ { zend_class_entry *ce = Z_OBJCE_P(array_ptr); zend_object_iterator *iter = ce->get_iterator(ce, array_ptr, by_ref); - zend_bool is_empty; + bool is_empty; if (UNEXPECTED(!iter) || UNEXPECTED(EG(exception))) { if (iter) { diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 62cee34452..3339f3992d 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -43,7 +43,7 @@ ZEND_API void zend_init_code_execute_data(zend_execute_data *execute_data, zend_ ZEND_API void zend_execute(zend_op_array *op_array, zval *return_value); ZEND_API void execute_ex(zend_execute_data *execute_data); ZEND_API void execute_internal(zend_execute_data *execute_data, zval *return_value); -ZEND_API zend_bool zend_is_valid_class_name(zend_string *name); +ZEND_API bool zend_is_valid_class_name(zend_string *name); ZEND_API zend_class_entry *zend_lookup_class(zend_string *name); ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, zend_string *lcname, uint32_t flags); ZEND_API zend_class_entry *zend_get_called_scope(zend_execute_data *ex); @@ -60,21 +60,21 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_missing_arg_error(zend_execute_data * ZEND_API ZEND_COLD void ZEND_FASTCALL zend_deprecated_function(const zend_function *fbc); ZEND_COLD void ZEND_FASTCALL zend_param_must_be_ref(const zend_function *func, uint32_t arg_num); -ZEND_API zend_bool ZEND_FASTCALL zend_verify_ref_assignable_zval(zend_reference *ref, zval *zv, zend_bool strict); -ZEND_API zend_bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref(zend_property_info *prop_info, zval *orig_val, zend_bool strict); +ZEND_API bool ZEND_FASTCALL zend_verify_ref_assignable_zval(zend_reference *ref, zval *zv, bool strict); +ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref(zend_property_info *prop_info, zval *orig_val, bool strict); ZEND_API ZEND_COLD void zend_throw_ref_type_error_zval(zend_property_info *prop, zval *zv); ZEND_API ZEND_COLD void zend_throw_ref_type_error_type(zend_property_info *prop1, zend_property_info *prop2, zval *zv); ZEND_API ZEND_COLD zend_result ZEND_FASTCALL zend_undefined_offset_write(HashTable *ht, zend_long lval); ZEND_API ZEND_COLD zend_result ZEND_FASTCALL zend_undefined_index_write(HashTable *ht, zend_string *offset); -ZEND_API zend_bool zend_verify_scalar_type_hint(uint32_t type_mask, zval *arg, zend_bool strict, zend_bool is_internal_arg); +ZEND_API bool zend_verify_scalar_type_hint(uint32_t type_mask, zval *arg, bool strict, bool is_internal_arg); ZEND_API ZEND_COLD void zend_verify_arg_error( const zend_function *zf, const zend_arg_info *arg_info, int arg_num, zval *value); ZEND_API ZEND_COLD void zend_verify_return_error( const zend_function *zf, zval *value); -ZEND_API zend_bool zend_verify_ref_array_assignable(zend_reference *ref); -ZEND_API zend_bool zend_value_instanceof_static(zval *zv); +ZEND_API bool zend_verify_ref_array_assignable(zend_reference *ref); +ZEND_API bool zend_value_instanceof_static(zval *zv); #define ZEND_REF_TYPE_SOURCES(ref) \ @@ -92,7 +92,7 @@ ZEND_API zend_bool zend_value_instanceof_static(zval *zv); ZEND_API void ZEND_FASTCALL zend_ref_add_type_source(zend_property_info_source_list *source_list, zend_property_info *prop); ZEND_API void ZEND_FASTCALL zend_ref_del_type_source(zend_property_info_source_list *source_list, zend_property_info *prop); -ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *value, zend_uchar value_type, zend_bool strict); +ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *value, zend_uchar value_type, bool strict); static zend_always_inline void zend_copy_to_variable(zval *variable_ptr, zval *value, zend_uchar value_type) { @@ -121,7 +121,7 @@ static zend_always_inline void zend_copy_to_variable(zval *variable_ptr, zval *v } } -static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval *value, zend_uchar value_type, zend_bool strict) +static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval *value, zend_uchar value_type, bool strict) { do { if (UNEXPECTED(Z_REFCOUNTED_P(variable_ptr))) { @@ -317,7 +317,7 @@ ZEND_API const char *zend_get_executed_filename(void); ZEND_API zend_string *zend_get_executed_filename_ex(void); ZEND_API uint32_t zend_get_executed_lineno(void); ZEND_API zend_class_entry *zend_get_executed_scope(void); -ZEND_API zend_bool zend_is_executing(void); +ZEND_API bool zend_is_executing(void); ZEND_API ZEND_COLD void ZEND_FASTCALL zend_cannot_pass_by_reference(uint32_t arg_num); ZEND_API void zend_set_timeout(zend_long seconds, bool reset_signals); @@ -418,7 +418,7 @@ ZEND_API int ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *call); #define ZEND_CLASS_HAS_TYPE_HINTS(ce) ((ce->ce_flags & ZEND_ACC_HAS_TYPE_HINTS) == ZEND_ACC_HAS_TYPE_HINTS) -ZEND_API zend_bool zend_verify_property_type(zend_property_info *info, zval *property, zend_bool strict); +ZEND_API bool zend_verify_property_type(zend_property_info *info, zval *property, bool strict); ZEND_COLD void zend_verify_property_type_error(zend_property_info *info, zval *property); #define ZEND_REF_ADD_TYPE_SOURCE(ref, source) \ diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 2f200bb5b9..4a6ff1bdbc 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -258,9 +258,9 @@ void shutdown_executor(void) /* {{{ */ zend_string *key; zval *zv; #if ZEND_DEBUG - zend_bool fast_shutdown = 0; + bool fast_shutdown = 0; #else - zend_bool fast_shutdown = is_zend_mm() && !EG(full_tables_cleanup); + bool fast_shutdown = is_zend_mm() && !EG(full_tables_cleanup); #endif zend_try { @@ -604,7 +604,7 @@ ZEND_API zend_class_entry *zend_get_executed_scope(void) /* {{{ */ } /* }}} */ -ZEND_API zend_bool zend_is_executing(void) /* {{{ */ +ZEND_API bool zend_is_executing(void) /* {{{ */ { return EG(current_execute_data) != 0; } @@ -759,7 +759,7 @@ zend_result zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_ for (i=0; i<fci->param_count; i++) { zval *param = ZEND_CALL_ARG(call, i+1); zval *arg = &fci->params[i]; - zend_bool must_wrap = 0; + bool must_wrap = 0; if (UNEXPECTED(Z_ISUNDEF_P(arg))) { /* Allow forwarding undef slots. This is only used by Closure::__invoke(). */ ZVAL_UNDEF(param); @@ -806,9 +806,9 @@ cleanup_args: zend_string *name; zval *arg; uint32_t arg_num = ZEND_CALL_NUM_ARGS(call) + 1; - zend_bool have_named_params = 0; + bool have_named_params = 0; ZEND_HASH_FOREACH_STR_KEY_VAL(fci->named_params, name, arg) { - zend_bool must_wrap = 0; + bool must_wrap = 0; zval *target; if (name) { void *cache_slot[2] = {NULL, NULL}; @@ -1017,7 +1017,7 @@ static const uint32_t valid_chars[8] = { 0xffffffff, }; -ZEND_API zend_bool zend_is_valid_class_name(zend_string *name) { +ZEND_API bool zend_is_valid_class_name(zend_string *name) { for (size_t i = 0; i < ZSTR_LEN(name); i++) { unsigned char c = ZSTR_VAL(name)[i]; if (!ZEND_BIT_TEST(valid_chars, c)) { diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c index 0546d589bf..7a9dc4dd61 100644 --- a/Zend/zend_gc.c +++ b/Zend/zend_gc.c @@ -209,10 +209,10 @@ typedef struct _gc_root_buffer { typedef struct _zend_gc_globals { gc_root_buffer *buf; /* preallocated arrays of buffers */ - zend_bool gc_enabled; - zend_bool gc_active; /* GC currently running, forbid nested GC */ - zend_bool gc_protected; /* GC protected, forbid root additions */ - zend_bool gc_full; + bool gc_enabled; + bool gc_active; /* GC currently running, forbid nested GC */ + bool gc_protected; /* GC protected, forbid root additions */ + bool gc_full; uint32_t unused; /* linked list of unused buffers */ uint32_t first_unused; /* first unused buffer */ @@ -493,9 +493,9 @@ void gc_reset(void) } } -ZEND_API zend_bool gc_enable(zend_bool enable) +ZEND_API bool gc_enable(bool enable) { - zend_bool old_enabled = GC_G(gc_enabled); + bool old_enabled = GC_G(gc_enabled); GC_G(gc_enabled) = enable; if (enable && !old_enabled && GC_G(buf) == NULL) { GC_G(buf) = (gc_root_buffer*) pemalloc(sizeof(gc_root_buffer) * GC_DEFAULT_BUF_SIZE, 1); @@ -507,19 +507,19 @@ ZEND_API zend_bool gc_enable(zend_bool enable) return old_enabled; } -ZEND_API zend_bool gc_enabled(void) +ZEND_API bool gc_enabled(void) { return GC_G(gc_enabled); } -ZEND_API zend_bool gc_protect(zend_bool protect) +ZEND_API bool gc_protect(bool protect) { - zend_bool old_protected = GC_G(gc_protected); + bool old_protected = GC_G(gc_protected); GC_G(gc_protected) = protect; return old_protected; } -ZEND_API zend_bool gc_protected(void) +ZEND_API bool gc_protected(void) { return GC_G(gc_protected); } diff --git a/Zend/zend_gc.h b/Zend/zend_gc.h index f44786425f..3221335733 100644 --- a/Zend/zend_gc.h +++ b/Zend/zend_gc.h @@ -35,12 +35,12 @@ ZEND_API void ZEND_FASTCALL gc_possible_root(zend_refcounted *ref); ZEND_API void ZEND_FASTCALL gc_remove_from_buffer(zend_refcounted *ref); /* enable/disable automatic start of GC collection */ -ZEND_API zend_bool gc_enable(zend_bool enable); -ZEND_API zend_bool gc_enabled(void); +ZEND_API bool gc_enable(bool enable); +ZEND_API bool gc_enabled(void); /* enable/disable possible root additions */ -ZEND_API zend_bool gc_protect(zend_bool protect); -ZEND_API zend_bool gc_protected(void); +ZEND_API bool gc_protect(bool protect); +ZEND_API bool gc_protected(void); /* The default implementation of the gc_collect_cycles callback. */ ZEND_API int zend_gc_collect_cycles(void); diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index 5ef517c5b1..4e6f1d4bbd 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -115,7 +115,7 @@ static void zend_generator_cleanup_unfinished_execution( } /* }}} */ -ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished_execution) /* {{{ */ +ZEND_API void zend_generator_close(zend_generator *generator, bool finished_execution) /* {{{ */ { if (EXPECTED(generator->execute_data)) { zend_execute_data *execute_data = generator->execute_data; diff --git a/Zend/zend_generators.h b/Zend/zend_generators.h index a082e46114..17b25a99b8 100644 --- a/Zend/zend_generators.h +++ b/Zend/zend_generators.h @@ -94,7 +94,7 @@ static const zend_uchar ZEND_GENERATOR_AT_FIRST_YIELD = 0x4; static const zend_uchar ZEND_GENERATOR_DO_INIT = 0x8; void zend_register_generator_ce(void); -ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished_execution); +ZEND_API void zend_generator_close(zend_generator *generator, bool finished_execution); ZEND_API void zend_generator_resume(zend_generator *generator); ZEND_API void zend_generator_restore_call_stack(zend_generator *generator); diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h index e0e8ac7700..6d67325fe1 100644 --- a/Zend/zend_globals.h +++ b/Zend/zend_globals.h @@ -81,19 +81,19 @@ struct _zend_compiler_globals { /* Refer to zend_yytnamerr() in zend_language_parser.y for meaning of values */ zend_uchar parse_error; - zend_bool in_compilation; - zend_bool short_tags; + bool in_compilation; + bool short_tags; - zend_bool unclean_shutdown; + bool unclean_shutdown; - zend_bool ini_parser_unbuffered_errors; + bool ini_parser_unbuffered_errors; zend_llist open_files; struct _zend_ini_parser_param *ini_parser_param; - zend_bool skip_shebang; - zend_bool increment_lineno; + bool skip_shebang; + bool increment_lineno; zend_string *doc_comment; uint32_t extra_fn_flags; @@ -109,9 +109,9 @@ struct _zend_compiler_globals { const zend_encoding **script_encoding_list; size_t script_encoding_list_size; - zend_bool multibyte; - zend_bool detect_unicode; - zend_bool encoding_declared; + bool multibyte; + bool detect_unicode; + bool encoding_declared; zend_ast *ast; zend_arena *ast_arena; @@ -176,13 +176,13 @@ struct _zend_executor_globals { uint32_t persistent_classes_count; HashTable *in_autoload; - zend_bool full_tables_cleanup; + bool full_tables_cleanup; /* for extended information support */ - zend_bool no_extensions; + bool no_extensions; - zend_bool vm_interrupt; - zend_bool timed_out; + bool vm_interrupt; + bool timed_out; zend_long hard_timeout; #ifdef ZEND_WIN32 @@ -218,7 +218,7 @@ struct _zend_executor_globals { struct _zend_module_entry *current_module; - zend_bool active; + bool active; zend_uchar flags; zend_long assertions; @@ -238,7 +238,7 @@ struct _zend_executor_globals { HashTable weakrefs; - zend_bool exception_ignore_args; + bool exception_ignore_args; zend_long exception_string_param_max_len; zend_get_gc_buffer get_gc_buffer; @@ -291,9 +291,9 @@ struct _zend_php_scanner_globals { zend_stack state_stack; zend_ptr_stack heredoc_label_stack; zend_stack nest_location_stack; /* for syntax error reporting */ - zend_bool heredoc_scan_ahead; + bool heredoc_scan_ahead; int heredoc_indentation; - zend_bool heredoc_indentation_uses_spaces; + bool heredoc_indentation_uses_spaces; /* original (unfiltered) script */ unsigned char *script_org; diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 6d065cd03e..986866ee52 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -246,7 +246,7 @@ ZEND_API const HashTable zend_empty_array = { .pDestructor = ZVAL_PTR_DTOR }; -static zend_always_inline void _zend_hash_init_int(HashTable *ht, uint32_t nSize, dtor_func_t pDestructor, zend_bool persistent) +static zend_always_inline void _zend_hash_init_int(HashTable *ht, uint32_t nSize, dtor_func_t pDestructor, bool persistent) { GC_SET_REFCOUNT(ht, 1); GC_TYPE_INFO(ht) = GC_ARRAY | (persistent ? ((GC_PERSISTENT|GC_NOT_COLLECTABLE) << GC_FLAGS_SHIFT) : 0); @@ -261,7 +261,7 @@ static zend_always_inline void _zend_hash_init_int(HashTable *ht, uint32_t nSize ht->nTableSize = zend_hash_check_size(nSize); } -ZEND_API void ZEND_FASTCALL _zend_hash_init(HashTable *ht, uint32_t nSize, dtor_func_t pDestructor, zend_bool persistent) +ZEND_API void ZEND_FASTCALL _zend_hash_init(HashTable *ht, uint32_t nSize, dtor_func_t pDestructor, bool persistent) { _zend_hash_init_int(ht, nSize, pDestructor, persistent); } @@ -310,7 +310,7 @@ static void ZEND_FASTCALL zend_hash_packed_grow(HashTable *ht) HT_SET_DATA_ADDR(ht, perealloc2(HT_GET_DATA_ADDR(ht), HT_SIZE_EX(ht->nTableSize, HT_MIN_MASK), HT_USED_SIZE(ht), GC_FLAGS(ht) & IS_ARRAY_PERSISTENT)); } -ZEND_API void ZEND_FASTCALL zend_hash_real_init(HashTable *ht, zend_bool packed) +ZEND_API void ZEND_FASTCALL zend_hash_real_init(HashTable *ht, bool packed) { IS_CONSISTENT(ht); @@ -365,7 +365,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_to_packed(HashTable *ht) pefree(old_data, GC_FLAGS(ht) & IS_ARRAY_PERSISTENT); } -ZEND_API void ZEND_FASTCALL zend_hash_extend(HashTable *ht, uint32_t nSize, zend_bool packed) +ZEND_API void ZEND_FASTCALL zend_hash_extend(HashTable *ht, uint32_t nSize, bool packed) { HT_ASSERT_RC1(ht); if (nSize == 0) return; @@ -636,7 +636,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_iterators_advance(HashTable *ht, HashPosit } } -static zend_always_inline Bucket *zend_hash_find_bucket(const HashTable *ht, zend_string *key, zend_bool known_hash) +static zend_always_inline Bucket *zend_hash_find_bucket(const HashTable *ht, zend_string *key, bool known_hash) { zend_ulong h; uint32_t nIndex; @@ -2145,7 +2145,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source) } -ZEND_API void ZEND_FASTCALL zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, zend_bool overwrite) +ZEND_API void ZEND_FASTCALL zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, bool overwrite) { uint32_t idx; Bucket *p; @@ -2203,7 +2203,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_merge(HashTable *target, HashTable *source } -static zend_bool ZEND_FASTCALL zend_hash_replace_checker_wrapper(HashTable *target, zval *source_data, Bucket *p, void *pParam, merge_checker_func_t merge_checker_func) +static bool ZEND_FASTCALL zend_hash_replace_checker_wrapper(HashTable *target, zval *source_data, Bucket *p, void *pParam, merge_checker_func_t merge_checker_func) { zend_hash_key hash_key; @@ -2494,7 +2494,7 @@ ZEND_API void zend_hash_bucket_packed_swap(Bucket *p, Bucket *q) q->h = h; } -ZEND_API void ZEND_FASTCALL zend_hash_sort_ex(HashTable *ht, sort_func_t sort, bucket_compare_func_t compar, zend_bool renumber) +ZEND_API void ZEND_FASTCALL zend_hash_sort_ex(HashTable *ht, sort_func_t sort, bucket_compare_func_t compar, bool renumber) { Bucket *p; uint32_t i, j; @@ -2566,7 +2566,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_sort_ex(HashTable *ht, sort_func_t sort, b } } -static zend_always_inline int zend_hash_compare_impl(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered) { +static zend_always_inline int zend_hash_compare_impl(HashTable *ht1, HashTable *ht2, compare_func_t compar, bool ordered) { uint32_t idx1, idx2; if (ht1->nNumOfElements != ht2->nNumOfElements) { @@ -2644,7 +2644,7 @@ static zend_always_inline int zend_hash_compare_impl(HashTable *ht1, HashTable * return 0; } -ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered) +ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, bool ordered) { int result; IS_CONSISTENT(ht1); @@ -2803,7 +2803,7 @@ convert: * a "symtable" (contains integer and non-numeric string keys). * If the proptable didn't need duplicating, its refcount is incremented. */ -ZEND_API HashTable* ZEND_FASTCALL zend_proptable_to_symtable(HashTable *ht, zend_bool always_duplicate) +ZEND_API HashTable* ZEND_FASTCALL zend_proptable_to_symtable(HashTable *ht, bool always_duplicate) { zend_ulong num_key; zend_string *str_key; diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index ced21a2ca1..e339345a32 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -92,24 +92,24 @@ typedef struct _zend_hash_key { zend_string *key; } zend_hash_key; -typedef zend_bool (*merge_checker_func_t)(HashTable *target_ht, zval *source_data, zend_hash_key *hash_key, void *pParam); +typedef bool (*merge_checker_func_t)(HashTable *target_ht, zval *source_data, zend_hash_key *hash_key, void *pParam); BEGIN_EXTERN_C() /* startup/shutdown */ -ZEND_API void ZEND_FASTCALL _zend_hash_init(HashTable *ht, uint32_t nSize, dtor_func_t pDestructor, zend_bool persistent); +ZEND_API void ZEND_FASTCALL _zend_hash_init(HashTable *ht, uint32_t nSize, dtor_func_t pDestructor, bool persistent); ZEND_API void ZEND_FASTCALL zend_hash_destroy(HashTable *ht); ZEND_API void ZEND_FASTCALL zend_hash_clean(HashTable *ht); #define zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent) \ _zend_hash_init((ht), (nSize), (pDestructor), (persistent)) -ZEND_API void ZEND_FASTCALL zend_hash_real_init(HashTable *ht, zend_bool packed); +ZEND_API void ZEND_FASTCALL zend_hash_real_init(HashTable *ht, bool packed); ZEND_API void ZEND_FASTCALL zend_hash_real_init_packed(HashTable *ht); ZEND_API void ZEND_FASTCALL zend_hash_real_init_mixed(HashTable *ht); ZEND_API void ZEND_FASTCALL zend_hash_packed_to_hash(HashTable *ht); ZEND_API void ZEND_FASTCALL zend_hash_to_packed(HashTable *ht); -ZEND_API void ZEND_FASTCALL zend_hash_extend(HashTable *ht, uint32_t nSize, zend_bool packed); +ZEND_API void ZEND_FASTCALL zend_hash_extend(HashTable *ht, uint32_t nSize, bool packed); ZEND_API void ZEND_FASTCALL zend_hash_discard(HashTable *ht, uint32_t nNumUsed); /* additions/updates/changes */ @@ -178,7 +178,7 @@ ZEND_API zval* ZEND_FASTCALL _zend_hash_index_find(const HashTable *ht, zend_ulo /* The same as zend_hash_find(), but hash value of the key must be already calculated */ ZEND_API zval* ZEND_FASTCALL _zend_hash_find_known_hash(const HashTable *ht, zend_string *key); -static zend_always_inline zval *zend_hash_find_ex(const HashTable *ht, zend_string *key, zend_bool known_hash) +static zend_always_inline zval *zend_hash_find_ex(const HashTable *ht, zend_string *key, bool known_hash) { if (known_hash) { return _zend_hash_find_known_hash(ht, key); @@ -207,17 +207,17 @@ static zend_always_inline zval *zend_hash_find_ex(const HashTable *ht, zend_stri /* Misc */ -static zend_always_inline zend_bool zend_hash_exists(const HashTable *ht, zend_string *key) +static zend_always_inline bool zend_hash_exists(const HashTable *ht, zend_string *key) { return zend_hash_find(ht, key) != NULL; } -static zend_always_inline zend_bool zend_hash_str_exists(const HashTable *ht, const char *str, size_t len) +static zend_always_inline bool zend_hash_str_exists(const HashTable *ht, const char *str, size_t len) { return zend_hash_str_find(ht, str, len) != NULL; } -static zend_always_inline zend_bool zend_hash_index_exists(const HashTable *ht, zend_ulong h) +static zend_always_inline bool zend_hash_index_exists(const HashTable *ht, zend_ulong h) { return zend_hash_index_find(ht, h) != NULL; } @@ -257,15 +257,15 @@ ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_end_ex(HashTable *ht, Ha /* Copying, merging and sorting */ ZEND_API void ZEND_FASTCALL zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor); -ZEND_API void ZEND_FASTCALL zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, zend_bool overwrite); +ZEND_API void ZEND_FASTCALL zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, bool overwrite); ZEND_API void ZEND_FASTCALL zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, merge_checker_func_t pMergeSource, void *pParam); ZEND_API void zend_hash_bucket_swap(Bucket *p, Bucket *q); ZEND_API void zend_hash_bucket_renum_swap(Bucket *p, Bucket *q); ZEND_API void zend_hash_bucket_packed_swap(Bucket *p, Bucket *q); typedef int (*bucket_compare_func_t)(Bucket *a, Bucket *b); -ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered); -ZEND_API void ZEND_FASTCALL zend_hash_sort_ex(HashTable *ht, sort_func_t sort_func, bucket_compare_func_t compare_func, zend_bool renumber); +ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, bool ordered); +ZEND_API void ZEND_FASTCALL zend_hash_sort_ex(HashTable *ht, sort_func_t sort_func, bucket_compare_func_t compare_func, bool renumber); ZEND_API zval* ZEND_FASTCALL zend_hash_minmax(const HashTable *ht, bucket_compare_func_t compar, uint32_t flag); #define zend_hash_sort(ht, compare_func, renumber) \ @@ -303,7 +303,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source); ZEND_API void ZEND_FASTCALL zend_array_destroy(HashTable *ht); ZEND_API void ZEND_FASTCALL zend_symtable_clean(HashTable *ht); ZEND_API HashTable* ZEND_FASTCALL zend_symtable_to_proptable(HashTable *ht); -ZEND_API HashTable* ZEND_FASTCALL zend_proptable_to_symtable(HashTable *ht, zend_bool always_duplicate); +ZEND_API HashTable* ZEND_FASTCALL zend_proptable_to_symtable(HashTable *ht, bool always_duplicate); ZEND_API bool ZEND_FASTCALL _zend_handle_numeric_str_ex(const char *key, size_t length, zend_ulong *idx); @@ -386,7 +386,7 @@ static zend_always_inline zval *zend_hash_find_ind(const HashTable *ht, zend_str } -static zend_always_inline zval *zend_hash_find_ex_ind(const HashTable *ht, zend_string *key, zend_bool known_hash) +static zend_always_inline zval *zend_hash_find_ex_ind(const HashTable *ht, zend_string *key, bool known_hash) { zval *zv; @@ -839,7 +839,7 @@ static zend_always_inline void *zend_hash_find_ptr(const HashTable *ht, zend_str } } -static zend_always_inline void *zend_hash_find_ex_ptr(const HashTable *ht, zend_string *key, zend_bool known_hash) +static zend_always_inline void *zend_hash_find_ex_ptr(const HashTable *ht, zend_string *key, bool known_hash) { zval *zv; diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 4b161692af..81e7c02a6c 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -35,7 +35,7 @@ static void add_property_compatibility_obligation( zend_class_entry *ce, const zend_property_info *child_prop, const zend_property_info *parent_prop); -static void zend_type_copy_ctor(zend_type *type, zend_bool persistent) { +static void zend_type_copy_ctor(zend_type *type, bool persistent) { if (ZEND_TYPE_HAS_LIST(*type)) { zend_type_list *old_list = ZEND_TYPE_LIST(*type); size_t size = ZEND_TYPE_LIST_SIZE(old_list->num_types); @@ -111,7 +111,7 @@ static zend_function *zend_duplicate_user_function(zend_function *func) /* {{{ * } /* }}} */ -static zend_always_inline zend_function *zend_duplicate_function(zend_function *func, zend_class_entry *ce, zend_bool is_interface) /* {{{ */ +static zend_always_inline zend_function *zend_duplicate_function(zend_function *func, zend_class_entry *ce, bool is_interface) /* {{{ */ { if (UNEXPECTED(func->type == ZEND_INTERNAL_FUNCTION)) { return zend_duplicate_internal_function(func, ce); @@ -229,7 +229,7 @@ static zend_string *resolve_class_name(zend_class_entry *scope, zend_string *nam } } -static zend_bool class_visible(zend_class_entry *ce) { +static bool class_visible(zend_class_entry *ce) { if (ce->type == ZEND_INTERNAL_CLASS) { return !(CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_CLASSES); } else { @@ -240,7 +240,7 @@ static zend_bool class_visible(zend_class_entry *ce) { } static zend_class_entry *lookup_class( - zend_class_entry *scope, zend_string *name, zend_bool register_unresolved) { + zend_class_entry *scope, zend_string *name, bool register_unresolved) { uint32_t flags = ZEND_FETCH_CLASS_ALLOW_UNLINKED | ZEND_FETCH_CLASS_NO_AUTOLOAD; zend_class_entry *ce = zend_lookup_class_ex(name, NULL, flags); if (!CG(in_compilation)) { @@ -271,7 +271,7 @@ static zend_class_entry *lookup_class( } /* Instanceof that's safe to use on unlinked classes. */ -static zend_bool unlinked_instanceof(zend_class_entry *ce1, zend_class_entry *ce2) { +static bool unlinked_instanceof(zend_class_entry *ce1, zend_class_entry *ce2) { if (ce1 == ce2) { return 1; } @@ -322,7 +322,7 @@ static zend_bool unlinked_instanceof(zend_class_entry *ce1, zend_class_entry *ce return 0; } -static zend_bool zend_type_contains_traversable(zend_type type) { +static bool zend_type_contains_traversable(zend_type type) { zend_type *single_type; if (ZEND_TYPE_FULL_MASK(type) & MAY_BE_OBJECT) { return 1; @@ -337,7 +337,7 @@ static zend_bool zend_type_contains_traversable(zend_type type) { return 0; } -static zend_bool zend_type_permits_self( +static bool zend_type_permits_self( zend_type type, zend_class_entry *scope, zend_class_entry *self) { if (ZEND_TYPE_FULL_MASK(type) & MAY_BE_OBJECT) { return 1; @@ -371,8 +371,8 @@ typedef enum { static inheritance_status zend_perform_covariant_class_type_check( zend_class_entry *fe_scope, zend_string *fe_class_name, zend_class_entry *fe_ce, zend_class_entry *proto_scope, zend_type proto_type, - zend_bool register_unresolved) { - zend_bool have_unresolved = 0; + bool register_unresolved) { + bool have_unresolved = 0; if (ZEND_TYPE_FULL_MASK(proto_type) & MAY_BE_OBJECT) { /* Currently, any class name would be allowed here. We still perform a class lookup * for forward-compatibility reasons, as we may have named types in the future that @@ -458,7 +458,7 @@ static inheritance_status zend_perform_covariant_type_check( } zend_type *single_type; - zend_bool all_success = 1; + bool all_success = 1; /* First try to check whether we can succeed without resolving anything */ ZEND_TYPE_FOREACH(fe_type, single_type) { @@ -540,7 +540,7 @@ static inheritance_status zend_do_perform_implementation_check( { uint32_t i, num_args, proto_num_args, fe_num_args; inheritance_status status, local_status; - zend_bool proto_is_variadic, fe_is_variadic; + bool proto_is_variadic, fe_is_variadic; /* Checks for constructors only if they are declared in an interface, * or explicitly marked as abstract @@ -833,7 +833,7 @@ static zend_always_inline inheritance_status do_inheritance_check_on_method_ex( zend_function *child, zend_class_entry *child_scope, zend_function *parent, zend_class_entry *parent_scope, zend_class_entry *ce, zval *child_zv, - zend_bool check_visibility, zend_bool check_only, zend_bool checked) /* {{{ */ + bool check_visibility, bool check_only, bool checked) /* {{{ */ { uint32_t child_flags; uint32_t parent_flags = parent->common.fn_flags; @@ -943,12 +943,12 @@ static zend_always_inline inheritance_status do_inheritance_check_on_method_ex( static zend_never_inline void do_inheritance_check_on_method( zend_function *child, zend_class_entry *child_scope, zend_function *parent, zend_class_entry *parent_scope, - zend_class_entry *ce, zval *child_zv, zend_bool check_visibility) + zend_class_entry *ce, zval *child_zv, bool check_visibility) { do_inheritance_check_on_method_ex(child, child_scope, parent, parent_scope, ce, child_zv, check_visibility, 0, 0); } -static zend_always_inline void do_inherit_method(zend_string *key, zend_function *parent, zend_class_entry *ce, zend_bool is_interface, zend_bool checked) /* {{{ */ +static zend_always_inline void do_inherit_method(zend_string *key, zend_function *parent, zend_class_entry *ce, bool is_interface, bool checked) /* {{{ */ { zval *child = zend_hash_find_ex(&ce->function_table, key, 1); @@ -1189,7 +1189,7 @@ void zend_build_properties_info_table(zend_class_entry *ce) } ZEND_HASH_FOREACH_END(); } -ZEND_API void zend_do_inheritance_ex(zend_class_entry *ce, zend_class_entry *parent_ce, zend_bool checked) /* {{{ */ +ZEND_API void zend_do_inheritance_ex(zend_class_entry *ce, zend_class_entry *parent_ce, bool checked) /* {{{ */ { zend_property_info *property_info; zend_function *func; @@ -1412,7 +1412,7 @@ ZEND_API void zend_do_inheritance_ex(zend_class_entry *ce, zend_class_entry *par } /* }}} */ -static zend_bool do_inherit_constant_check(HashTable *child_constants_table, zend_class_constant *parent_constant, zend_string *name, const zend_class_entry *iface) /* {{{ */ +static bool do_inherit_constant_check(HashTable *child_constants_table, zend_class_constant *parent_constant, zend_string *name, const zend_class_entry *iface) /* {{{ */ { zval *zv = zend_hash_find_ex(child_constants_table, name, 1); zend_class_constant *old_constant; @@ -1952,7 +1952,7 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent zend_property_info *new_prop; zend_string* prop_name; const char* class_name_unused; - zend_bool not_compatible; + bool not_compatible; zval* prop_value; uint32_t flags; zend_string *doc_comment; @@ -2162,7 +2162,7 @@ void zend_verify_abstract_class(zend_class_entry *ce) /* {{{ */ { zend_function *func; zend_abstract_info ai; - zend_bool is_explicit_abstract = (ce->ce_flags & ZEND_ACC_EXPLICIT_ABSTRACT_CLASS) != 0; + bool is_explicit_abstract = (ce->ce_flags & ZEND_ACC_EXPLICIT_ABSTRACT_CLASS) != 0; memset(&ai, 0, sizeof(ai)); ZEND_HASH_FOREACH_PTR(&ce->function_table, func) { @@ -2540,7 +2540,7 @@ static inheritance_status zend_can_early_bind(zend_class_entry *ce, zend_class_e } /* }}} */ -zend_bool zend_try_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce, zend_string *lcname, zval *delayed_early_binding) /* {{{ */ +bool zend_try_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce, zend_string *lcname, zval *delayed_early_binding) /* {{{ */ { inheritance_status status = zend_can_early_bind(ce, parent_ce); diff --git a/Zend/zend_inheritance.h b/Zend/zend_inheritance.h index e49ec49b6f..e82910f052 100644 --- a/Zend/zend_inheritance.h +++ b/Zend/zend_inheritance.h @@ -25,7 +25,7 @@ BEGIN_EXTERN_C() ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry *iface); -ZEND_API void zend_do_inheritance_ex(zend_class_entry *ce, zend_class_entry *parent_ce, zend_bool checked); +ZEND_API void zend_do_inheritance_ex(zend_class_entry *ce, zend_class_entry *parent_ce, bool checked); #define zend_do_inheritance(ce, parent_ce) \ zend_do_inheritance_ex(ce, parent_ce, 0) @@ -34,7 +34,7 @@ ZEND_API zend_result zend_do_link_class(zend_class_entry *ce, zend_string *lc_pa void zend_verify_abstract_class(zend_class_entry *ce); void zend_build_properties_info_table(zend_class_entry *ce); -zend_bool zend_try_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce, zend_string *lcname, zval *delayed_early_binding); +bool zend_try_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce, zend_string *lcname, zval *delayed_early_binding); END_EXTERN_C() diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index 75c7faf4c0..b3418b1152 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -311,7 +311,7 @@ ZEND_API zend_result zend_alter_ini_entry_ex(zend_string *name, zend_string *new zend_ini_entry *ini_entry; zend_string *duplicate; uint8_t modifiable; - zend_bool modified; + bool modified; if ((ini_entry = zend_hash_find_ptr(EG(ini_directives), name)) == NULL) { return FAILURE; @@ -431,7 +431,7 @@ ZEND_API double zend_ini_double(const char *name, size_t name_length, int orig) } /* }}} */ -ZEND_API char *zend_ini_string_ex(const char *name, size_t name_length, int orig, zend_bool *exists) /* {{{ */ +ZEND_API char *zend_ini_string_ex(const char *name, size_t name_length, int orig, bool *exists) /* {{{ */ { zend_ini_entry *ini_entry; @@ -457,7 +457,7 @@ ZEND_API char *zend_ini_string_ex(const char *name, size_t name_length, int orig ZEND_API char *zend_ini_string(const char *name, size_t name_length, int orig) /* {{{ */ { - zend_bool exists = 1; + bool exists = 1; char *return_value; return_value = zend_ini_string_ex(name, name_length, orig, &exists); @@ -483,7 +483,7 @@ ZEND_API zend_string *zend_ini_get_value(zend_string *name) /* {{{ */ } /* }}} */ -ZEND_API zend_bool zend_ini_parse_bool(zend_string *str) +ZEND_API bool zend_ini_parse_bool(zend_string *str) { if ((ZSTR_LEN(str) == 4 && strcasecmp(ZSTR_VAL(str), "true") == 0) || (ZSTR_LEN(str) == 3 && strcasecmp(ZSTR_VAL(str), "yes") == 0) @@ -573,7 +573,7 @@ ZEND_INI_DISP(display_link_numbers) /* {{{ */ /* Standard message handlers */ ZEND_API ZEND_INI_MH(OnUpdateBool) /* {{{ */ { - zend_bool *p = (zend_bool *) ZEND_INI_GET_ADDR(); + bool *p = (bool *) ZEND_INI_GET_ADDR(); *p = zend_ini_parse_bool(new_value); return SUCCESS; } diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h index d227f3779d..590ff09cef 100644 --- a/Zend/zend_ini.h +++ b/Zend/zend_ini.h @@ -84,9 +84,9 @@ ZEND_API void display_ini_entries(zend_module_entry *module); ZEND_API zend_long zend_ini_long(const char *name, size_t name_length, int orig); ZEND_API double zend_ini_double(const char *name, size_t name_length, int orig); ZEND_API char *zend_ini_string(const char *name, size_t name_length, int orig); -ZEND_API char *zend_ini_string_ex(const char *name, size_t name_length, int orig, zend_bool *exists); +ZEND_API char *zend_ini_string_ex(const char *name, size_t name_length, int orig, bool *exists); ZEND_API zend_string *zend_ini_get_value(zend_string *name); -ZEND_API zend_bool zend_ini_parse_bool(zend_string *str); +ZEND_API bool zend_ini_parse_bool(zend_string *str); ZEND_API zend_result zend_ini_register_displayer(const char *name, uint32_t name_length, void (*displayer)(zend_ini_entry *ini_entry, int type)); @@ -141,12 +141,12 @@ END_EXTERN_C() #define INI_INT(name) zend_ini_long((name), strlen(name), 0) #define INI_FLT(name) zend_ini_double((name), strlen(name), 0) #define INI_STR(name) zend_ini_string_ex((name), strlen(name), 0, NULL) -#define INI_BOOL(name) ((zend_bool) INI_INT(name)) +#define INI_BOOL(name) ((bool) INI_INT(name)) #define INI_ORIG_INT(name) zend_ini_long((name), strlen(name), 1) #define INI_ORIG_FLT(name) zend_ini_double((name), strlen(name), 1) #define INI_ORIG_STR(name) zend_ini_string((name), strlen(name), 1) -#define INI_ORIG_BOOL(name) ((zend_bool) INI_ORIG_INT(name)) +#define INI_ORIG_BOOL(name) ((bool) INI_ORIG_INT(name)) #define REGISTER_INI_ENTRIES() zend_register_ini_entries(ini_entries, module_number) #define UNREGISTER_INI_ENTRIES() zend_unregister_ini_entries(module_number) @@ -180,8 +180,8 @@ END_EXTERN_C() /* INI parsing engine */ typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg); BEGIN_EXTERN_C() -ZEND_API int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg); -ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg); +ZEND_API int zend_parse_ini_file(zend_file_handle *fh, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg); +ZEND_API int zend_parse_ini_string(char *str, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg); END_EXTERN_C() /* INI entries */ diff --git a/Zend/zend_ini_parser.y b/Zend/zend_ini_parser.y index f9170d9ecc..6d9dd09e34 100644 --- a/Zend/zend_ini_parser.y +++ b/Zend/zend_ini_parser.y @@ -212,7 +212,7 @@ static ZEND_COLD void ini_error(const char *msg) /* }}} */ /* {{{ zend_parse_ini_file() */ -ZEND_API zend_result zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg) +ZEND_API zend_result zend_parse_ini_file(zend_file_handle *fh, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg) { int retval; zend_ini_parser_param ini_parser_param; @@ -240,7 +240,7 @@ ZEND_API zend_result zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffe /* }}} */ /* {{{ zend_parse_ini_string() */ -ZEND_API zend_result zend_parse_ini_string(char *str, zend_bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg) +ZEND_API zend_result zend_parse_ini_string(char *str, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg) { int retval; zend_ini_parser_param ini_parser_param; diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 0d5af66d92..35e8ebe7e0 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -436,7 +436,7 @@ static int zend_implement_serializable(zend_class_entry *interface, zend_class_e typedef struct { zend_object std; zend_object_iterator *iter; - zend_bool rewind_called; + bool rewind_called; } zend_internal_iterator; static zend_object *zend_internal_iterator_create(zend_class_entry *ce) { diff --git a/Zend/zend_language_scanner.h b/Zend/zend_language_scanner.h index f08dbb4ea9..e3897c69a8 100644 --- a/Zend/zend_language_scanner.h +++ b/Zend/zend_language_scanner.h @@ -63,7 +63,7 @@ typedef struct _zend_heredoc_label { char *label; int length; int indentation; - zend_bool indentation_uses_spaces; + bool indentation_uses_spaces; } zend_heredoc_label; /* Track locations of unclosed {, [, (, etc. for better syntax error reporting */ diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index 96f36736d3..2679acf7fe 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -601,7 +601,7 @@ END_EXTERN_C() static zend_op_array *zend_compile(int type) { zend_op_array *op_array = NULL; - zend_bool original_in_compilation = CG(in_compilation); + bool original_in_compilation = CG(in_compilation); CG(in_compilation) = 1; CG(ast) = NULL; @@ -671,7 +671,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type) ZEND_API zend_ast *zend_compile_string_to_ast( zend_string *code, zend_arena **ast_arena, const char *filename) { zval code_zv; - zend_bool original_in_compilation; + bool original_in_compilation; zend_lex_state original_lex_state; zend_ast *ast; @@ -1017,7 +1017,7 @@ static zend_result zend_scan_escape_string(zval *zendlval, char *str, int len, c /* cache where we started so we can parse after validating */ char *start = s + 1; size_t len = 0; - zend_bool valid = 1; + bool valid = 1; unsigned long codepoint; if (*start != '{') { @@ -1157,9 +1157,9 @@ static const char *next_newline(const char *str, const char *end, size_t *newlin return NULL; } -static zend_bool strip_multiline_string_indentation( - zval *zendlval, int indentation, zend_bool using_spaces, - zend_bool newline_at_start, zend_bool newline_at_end) +static bool strip_multiline_string_indentation( + zval *zendlval, int indentation, bool using_spaces, + bool newline_at_start, bool newline_at_end) { const char *str = Z_STRVAL_P(zendlval), *end = str + Z_STRLEN_P(zendlval); char *copy = Z_STRVAL_P(zendlval); @@ -1913,7 +1913,7 @@ NEWLINE ("\r"|"\n"|"\r\n") /* The +/- 2 skips "0b" */ size_t len = yyleng - 2; char *end, *bin = yytext + 2; - zend_bool contains_underscores; + bool contains_underscores; /* Skip any leading 0s */ while (len > 0 && (*bin == '0' || *bin == '_')) { @@ -1955,7 +1955,7 @@ NEWLINE ("\r"|"\n"|"\r\n") /* The +/- 2 skips "0o" */ size_t len = yyleng - 2; char *end, *octal = yytext + 2; - zend_bool contains_underscores = (memchr(octal, '_', len) != NULL); + bool contains_underscores = (memchr(octal, '_', len) != NULL); /* Skip any leading 0s */ while (len > 0 && (*octal == '0' || *octal == '_')) { @@ -2004,8 +2004,8 @@ NEWLINE ("\r"|"\n"|"\r\n") <ST_IN_SCRIPTING>{LNUM} { size_t len = yyleng; char *end, *lnum = yytext; - zend_bool is_octal = lnum[0] == '0'; - zend_bool contains_underscores = (memchr(lnum, '_', len) != NULL); + bool is_octal = lnum[0] == '0'; + bool contains_underscores = (memchr(lnum, '_', len) != NULL); if (contains_underscores) { lnum = estrndup(lnum, len); @@ -2068,7 +2068,7 @@ NEWLINE ("\r"|"\n"|"\r\n") /* The +/- 2 skips "0x" */ size_t len = yyleng - 2; char *end, *hex = yytext + 2; - zend_bool contains_underscores; + bool contains_underscores; /* Skip any leading 0s */ while (len > 0 && (*hex == '0' || *hex == '_')) { @@ -2135,7 +2135,7 @@ string: const char *end; size_t len = yyleng; char *dnum = yytext; - zend_bool contains_underscores = (memchr(dnum, '_', len) != NULL); + bool contains_underscores = (memchr(dnum, '_', len) != NULL); if (contains_underscores) { dnum = estrndup(dnum, len); @@ -2573,7 +2573,7 @@ skip_escape_conversion: unsigned char *saved_cursor; int bprefix = (yytext[0] != '<') ? 1 : 0, spacing = 0, indentation = 0; zend_heredoc_label *heredoc_label = emalloc(sizeof(zend_heredoc_label)); - zend_bool is_heredoc = 1; + bool is_heredoc = 1; CG(zend_lineno)++; heredoc_label->length = yyleng-bprefix-3-1-(yytext[yyleng-2]=='\r'?1:0); @@ -2954,7 +2954,7 @@ heredoc_scan_done: ZVAL_STRINGL(zendlval, yytext, yyleng - newline); if (!SCNG(heredoc_scan_ahead) && !EG(exception) && PARSER_MODE()) { - zend_bool newline_at_start = *(yytext - 1) == '\n' || *(yytext - 1) == '\r'; + bool newline_at_start = *(yytext - 1) == '\n' || *(yytext - 1) == '\r'; zend_string *copy = Z_STR_P(zendlval); if (!strip_multiline_string_indentation( @@ -3055,7 +3055,7 @@ nowdoc_scan_done: ZVAL_STRINGL(zendlval, yytext, yyleng - newline); if (!EG(exception) && spacing != -1 && PARSER_MODE()) { - zend_bool newline_at_start = *(yytext - 1) == '\n' || *(yytext - 1) == '\r'; + bool newline_at_start = *(yytext - 1) == '\n' || *(yytext - 1) == '\r'; if (!strip_multiline_string_indentation( zendlval, indentation, spacing == HEREDOC_USING_SPACES, newline_at_start, newline != 0)) { diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index f091d679f6..64f1450daa 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -209,7 +209,7 @@ static void zend_std_call_issetter(zend_object *zobj, zend_string *prop_name, zv /* }}} */ -static zend_always_inline zend_bool is_derived_class(zend_class_entry *child_class, zend_class_entry *parent_class) /* {{{ */ +static zend_always_inline bool is_derived_class(zend_class_entry *child_class, zend_class_entry *parent_class) /* {{{ */ { child_class = child_class->parent; while (child_class) { @@ -443,7 +443,7 @@ found: } /* }}} */ -ZEND_API int zend_check_property_access(zend_object *zobj, zend_string *prop_info_name, zend_bool is_dynamic) /* {{{ */ +ZEND_API int zend_check_property_access(zend_object *zobj, zend_string *prop_info_name, bool is_dynamic) /* {{{ */ { zend_property_info *property_info; const char *class_name = NULL; @@ -691,7 +691,7 @@ exit: } /* }}} */ -static zend_always_inline zend_bool property_uses_strict_types() { +static zend_always_inline bool property_uses_strict_types() { zend_execute_data *execute_data = EG(current_execute_data); return execute_data && execute_data->func @@ -1440,7 +1440,7 @@ ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *p return zend_std_get_static_property_with_info(ce, property_name, type, &prop_info); } -ZEND_API ZEND_COLD zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name) /* {{{ */ +ZEND_API ZEND_COLD bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name) /* {{{ */ { zend_throw_error(NULL, "Attempt to unset static property %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(property_name)); return 0; @@ -1746,7 +1746,7 @@ ZEND_API int zend_std_cast_object_tostring(zend_object *readobj, zval *writeobj, } /* }}} */ -ZEND_API int zend_std_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, zend_bool check_only) /* {{{ */ +ZEND_API int zend_std_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, bool check_only) /* {{{ */ { zval *func; zend_class_entry *ce = obj->ce; diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h index 1f5d1d6744..d3587f9be2 100644 --- a/Zend/zend_object_handlers.h +++ b/Zend/zend_object_handlers.h @@ -134,7 +134,7 @@ typedef int (*zend_object_cast_t)(zend_object *readobj, zval *retval, int type); * Returns FAILURE if the object does not have any sense of overloaded dimensions */ typedef int (*zend_object_count_elements_t)(zend_object *object, zend_long *count); -typedef int (*zend_object_get_closure_t)(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, zend_bool check_only); +typedef int (*zend_object_get_closure_t)(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, bool check_only); typedef HashTable *(*zend_object_get_gc_t)(zend_object *object, zval **table, int *n); @@ -187,7 +187,7 @@ ZEND_API void zend_class_init_statics(zend_class_entry *ce); ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name_strval, const zval *key); ZEND_API zval *zend_std_get_static_property_with_info(zend_class_entry *ce, zend_string *property_name, int type, struct _zend_property_info **prop_info); ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, int type); -ZEND_API ZEND_COLD zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name); +ZEND_API ZEND_COLD bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name); ZEND_API zend_function *zend_std_get_constructor(zend_object *object); ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_string *member, int silent); ZEND_API HashTable *zend_std_get_properties(zend_object *object); @@ -206,12 +206,12 @@ ZEND_API void zend_std_unset_dimension(zend_object *object, zval *offset); ZEND_API zend_function *zend_std_get_method(zend_object **obj_ptr, zend_string *method_name, const zval *key); ZEND_API zend_string *zend_std_get_class_name(const zend_object *zobj); ZEND_API int zend_std_compare_objects(zval *o1, zval *o2); -ZEND_API int zend_std_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, zend_bool check_only); +ZEND_API int zend_std_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, bool check_only); ZEND_API void rebuild_object_properties(zend_object *zobj); ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope); -ZEND_API int zend_check_property_access(zend_object *zobj, zend_string *prop_info_name, zend_bool is_dynamic); +ZEND_API int zend_check_property_access(zend_object *zobj, zend_string *prop_info_name, bool is_dynamic); ZEND_API zend_function *zend_get_call_trampoline_func(zend_class_entry *ce, zend_string *method_name, int is_static); diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c index 80359b5e1e..104cda6141 100644 --- a/Zend/zend_objects_API.c +++ b/Zend/zend_objects_API.c @@ -79,7 +79,7 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_mark_destructed(zend_objects_stor } } -ZEND_API void ZEND_FASTCALL zend_objects_store_free_object_storage(zend_objects_store *objects, zend_bool fast_shutdown) +ZEND_API void ZEND_FASTCALL zend_objects_store_free_object_storage(zend_objects_store *objects, bool fast_shutdown) { zend_object **obj_ptr, **end, *obj; diff --git a/Zend/zend_objects_API.h b/Zend/zend_objects_API.h index 85ce701cd7..539850f227 100644 --- a/Zend/zend_objects_API.h +++ b/Zend/zend_objects_API.h @@ -54,7 +54,7 @@ BEGIN_EXTERN_C() ZEND_API void ZEND_FASTCALL zend_objects_store_init(zend_objects_store *objects, uint32_t init_size); ZEND_API void ZEND_FASTCALL zend_objects_store_call_destructors(zend_objects_store *objects); ZEND_API void ZEND_FASTCALL zend_objects_store_mark_destructed(zend_objects_store *objects); -ZEND_API void ZEND_FASTCALL zend_objects_store_free_object_storage(zend_objects_store *objects, zend_bool fast_shutdown); +ZEND_API void ZEND_FASTCALL zend_objects_store_free_object_storage(zend_objects_store *objects, bool fast_shutdown); ZEND_API void ZEND_FASTCALL zend_objects_store_destroy(zend_objects_store *objects); /* Store API functions */ diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 6681ef7b68..c9c65343f5 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -103,7 +103,7 @@ ZEND_API void destroy_zend_function(zend_function *function) zend_function_dtor(&tmp); } -ZEND_API void zend_type_release(zend_type type, zend_bool persistent) { +ZEND_API void zend_type_release(zend_type type, bool persistent) { if (ZEND_TYPE_HAS_LIST(type)) { zend_type *list_type; ZEND_TYPE_LIST_FOREACH(ZEND_TYPE_LIST(type), list_type) { @@ -754,14 +754,14 @@ static void emit_live_range( emit_live_range_raw(op_array, var_num, kind, start, end); } -static zend_bool is_fake_def(zend_op *opline) { +static bool is_fake_def(zend_op *opline) { /* These opcodes only modify the result, not create it. */ return opline->opcode == ZEND_ROPE_ADD || opline->opcode == ZEND_ADD_ARRAY_ELEMENT || opline->opcode == ZEND_ADD_ARRAY_UNPACK; } -static zend_bool keeps_op1_alive(zend_op *opline) { +static bool keeps_op1_alive(zend_op *opline) { /* These opcodes don't consume their OP1 operand, * it is later freed by something else. */ if (opline->opcode == ZEND_CASE diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 4575cdbf5a..29b2ed79b8 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -285,7 +285,7 @@ static zend_always_inline zend_result zendi_try_convert_scalar_to_number(zval *o } /* }}} */ -static zend_never_inline zend_long ZEND_FASTCALL zendi_try_get_long(zval *op, zend_bool *failed) /* {{{ */ +static zend_never_inline zend_long ZEND_FASTCALL zendi_try_get_long(zval *op, bool *failed) /* {{{ */ { *failed = 0; switch (Z_TYPE_P(op)) { @@ -377,7 +377,7 @@ static zend_never_inline zend_long ZEND_FASTCALL zendi_try_get_long(zval *op, ze #define convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, opcode, sigil) \ do { \ if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { \ - zend_bool failed; \ + bool failed; \ if (Z_ISREF_P(op1)) { \ op1 = Z_REFVAL_P(op1); \ if (Z_TYPE_P(op1) == IS_LONG) { \ @@ -400,7 +400,7 @@ static zend_never_inline zend_long ZEND_FASTCALL zendi_try_get_long(zval *op, ze } while (0); \ do { \ if (UNEXPECTED(Z_TYPE_P(op2) != IS_LONG)) { \ - zend_bool failed; \ + bool failed; \ if (Z_ISREF_P(op2)) { \ op2 = Z_REFVAL_P(op2); \ if (Z_TYPE_P(op2) == IS_LONG) { \ @@ -671,7 +671,7 @@ try_again: } /* }}} */ -ZEND_API zend_bool ZEND_FASTCALL _try_convert_to_string(zval *op) /* {{{ */ +ZEND_API bool ZEND_FASTCALL _try_convert_to_string(zval *op) /* {{{ */ { zend_string *str; @@ -870,7 +870,7 @@ try_again: } /* }}} */ -static zend_always_inline zend_string* __zval_get_string_func(zval *op, zend_bool try) /* {{{ */ +static zend_always_inline zend_string* __zval_get_string_func(zval *op, bool try) /* {{{ */ { try_again: switch (Z_TYPE_P(op)) { @@ -1518,7 +1518,7 @@ ZEND_API zend_result ZEND_FASTCALL bitwise_or_function(zval *result, zval *op1, } if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { - zend_bool failed; + bool failed; ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(ZEND_BW_OR); op1_lval = zendi_try_get_long(op1, &failed); if (UNEXPECTED(failed)) { @@ -1532,7 +1532,7 @@ ZEND_API zend_result ZEND_FASTCALL bitwise_or_function(zval *result, zval *op1, op1_lval = Z_LVAL_P(op1); } if (UNEXPECTED(Z_TYPE_P(op2) != IS_LONG)) { - zend_bool failed; + bool failed; ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(ZEND_BW_OR); op2_lval = zendi_try_get_long(op2, &failed); if (UNEXPECTED(failed)) { @@ -1600,7 +1600,7 @@ ZEND_API zend_result ZEND_FASTCALL bitwise_and_function(zval *result, zval *op1, } if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { - zend_bool failed; + bool failed; ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(ZEND_BW_AND); op1_lval = zendi_try_get_long(op1, &failed); if (UNEXPECTED(failed)) { @@ -1614,7 +1614,7 @@ ZEND_API zend_result ZEND_FASTCALL bitwise_and_function(zval *result, zval *op1, op1_lval = Z_LVAL_P(op1); } if (UNEXPECTED(Z_TYPE_P(op2) != IS_LONG)) { - zend_bool failed; + bool failed; ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(ZEND_BW_AND); op2_lval = zendi_try_get_long(op2, &failed); if (UNEXPECTED(failed)) { @@ -1682,7 +1682,7 @@ ZEND_API zend_result ZEND_FASTCALL bitwise_xor_function(zval *result, zval *op1, } if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { - zend_bool failed; + bool failed; ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(ZEND_BW_XOR); op1_lval = zendi_try_get_long(op1, &failed); if (UNEXPECTED(failed)) { @@ -1696,7 +1696,7 @@ ZEND_API zend_result ZEND_FASTCALL bitwise_xor_function(zval *result, zval *op1, op1_lval = Z_LVAL_P(op1); } if (UNEXPECTED(Z_TYPE_P(op2) != IS_LONG)) { - zend_bool failed; + bool failed; ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(ZEND_BW_XOR); op2_lval = zendi_try_get_long(op2, &failed); if (UNEXPECTED(failed)) { @@ -1898,7 +1898,7 @@ ZEND_API zend_result ZEND_FASTCALL concat_function(zval *result, zval *op1, zval } /* }}} */ -ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, zend_bool case_insensitive) /* {{{ */ +ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, bool case_insensitive) /* {{{ */ { zend_string *tmp_str1, *tmp_str2; zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); @@ -2182,7 +2182,7 @@ static int hash_zval_identical_function(zval *z1, zval *z2) /* {{{ */ } /* }}} */ -ZEND_API zend_bool ZEND_FASTCALL zend_is_identical(zval *op1, zval *op2) /* {{{ */ +ZEND_API bool ZEND_FASTCALL zend_is_identical(zval *op1, zval *op2) /* {{{ */ { if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) { return 0; @@ -2253,7 +2253,7 @@ ZEND_API zend_result ZEND_FASTCALL is_smaller_or_equal_function(zval *result, zv } /* }}} */ -ZEND_API zend_bool ZEND_FASTCALL zend_class_implements_interface(const zend_class_entry *class_ce, const zend_class_entry *interface_ce) /* {{{ */ +ZEND_API bool ZEND_FASTCALL zend_class_implements_interface(const zend_class_entry *class_ce, const zend_class_entry *interface_ce) /* {{{ */ { uint32_t i; ZEND_ASSERT(!(class_ce->ce_flags & ZEND_ACC_INTERFACE)); @@ -2271,7 +2271,7 @@ ZEND_API zend_bool ZEND_FASTCALL zend_class_implements_interface(const zend_clas } /* }}} */ -ZEND_API zend_bool ZEND_FASTCALL instanceof_function_slow(const zend_class_entry *instance_ce, const zend_class_entry *ce) /* {{{ */ +ZEND_API bool ZEND_FASTCALL instanceof_function_slow(const zend_class_entry *instance_ce, const zend_class_entry *ce) /* {{{ */ { ZEND_ASSERT(instance_ce != ce && "Should have been checked already"); if (ce->ce_flags & ZEND_ACC_INTERFACE) { diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 58280c55ad..b3ad598b74 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -54,7 +54,7 @@ ZEND_API zend_result ZEND_FASTCALL shift_left_function(zval *result, zval *op1, ZEND_API zend_result ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *op2); ZEND_API zend_result ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2); -ZEND_API zend_bool ZEND_FASTCALL zend_is_identical(zval *op1, zval *op2); +ZEND_API bool ZEND_FASTCALL zend_is_identical(zval *op1, zval *op2); ZEND_API zend_result ZEND_FASTCALL is_equal_function(zval *result, zval *op1, zval *op2); ZEND_API zend_result ZEND_FASTCALL is_identical_function(zval *result, zval *op1, zval *op2); @@ -63,10 +63,10 @@ ZEND_API zend_result ZEND_FASTCALL is_not_equal_function(zval *result, zval *op1 ZEND_API zend_result ZEND_FASTCALL is_smaller_function(zval *result, zval *op1, zval *op2); ZEND_API zend_result ZEND_FASTCALL is_smaller_or_equal_function(zval *result, zval *op1, zval *op2); -ZEND_API zend_bool ZEND_FASTCALL zend_class_implements_interface(const zend_class_entry *class_ce, const zend_class_entry *interface_ce); -ZEND_API zend_bool ZEND_FASTCALL instanceof_function_slow(const zend_class_entry *instance_ce, const zend_class_entry *ce); +ZEND_API bool ZEND_FASTCALL zend_class_implements_interface(const zend_class_entry *class_ce, const zend_class_entry *interface_ce); +ZEND_API bool ZEND_FASTCALL instanceof_function_slow(const zend_class_entry *instance_ce, const zend_class_entry *ce); -static zend_always_inline zend_bool instanceof_function( +static zend_always_inline bool instanceof_function( const zend_class_entry *instance_ce, const zend_class_entry *ce) { return instance_ce == ce || instanceof_function_slow(instance_ce, ce); } @@ -321,8 +321,8 @@ static zend_always_inline zend_string *zval_try_get_tmp_string(zval *op, zend_st /* Like convert_to_string(), but returns whether the conversion succeeded and does not modify the * zval in-place if it fails. */ -ZEND_API zend_bool ZEND_FASTCALL _try_convert_to_string(zval *op); -static zend_always_inline zend_bool try_convert_to_string(zval *op) { +ZEND_API bool ZEND_FASTCALL _try_convert_to_string(zval *op); +static zend_always_inline bool try_convert_to_string(zval *op) { if (Z_TYPE_P(op) == IS_STRING) { return 1; } @@ -408,7 +408,7 @@ ZEND_API int ZEND_FASTCALL zend_compare(zval *op1, zval *op2); ZEND_API zend_result ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2); ZEND_API int ZEND_FASTCALL numeric_compare_function(zval *op1, zval *op2); -ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, zend_bool case_insensitive); +ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, bool case_insensitive); ZEND_API int ZEND_FASTCALL string_compare_function(zval *op1, zval *op2); ZEND_API int ZEND_FASTCALL string_case_compare_function(zval *op1, zval *op2); ZEND_API int ZEND_FASTCALL string_locale_compare_function(zval *op1, zval *op2); @@ -843,7 +843,7 @@ static zend_always_inline bool fast_equal_check_string(zval *op1, zval *op2) return zend_compare(op1, op2) == 0; } -static zend_always_inline zend_bool fast_is_identical_function(zval *op1, zval *op2) +static zend_always_inline bool fast_is_identical_function(zval *op1, zval *op2) { if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) { return 0; @@ -853,7 +853,7 @@ static zend_always_inline zend_bool fast_is_identical_function(zval *op1, zval * return zend_is_identical(op1, op2); } -static zend_always_inline zend_bool fast_is_not_identical_function(zval *op1, zval *op2) +static zend_always_inline bool fast_is_not_identical_function(zval *op1, zval *op2) { if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) { return 1; diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index f4acc9930e..cda61117ea 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -335,7 +335,7 @@ char *alloca(); #if (defined(HAVE_ALLOCA) || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN) # define ZEND_ALLOCA_MAX_SIZE (32 * 1024) # define ALLOCA_FLAG(name) \ - zend_bool name; + bool name; # define SET_ALLOCA_FLAG(name) \ name = 1 # define do_alloca_ex(size, limit, use_heap) \ diff --git a/Zend/zend_ptr_stack.c b/Zend/zend_ptr_stack.c index 2030cc132b..80c77e11d7 100644 --- a/Zend/zend_ptr_stack.c +++ b/Zend/zend_ptr_stack.c @@ -21,7 +21,7 @@ #include "zend_ptr_stack.h" #include <stdarg.h> -ZEND_API void zend_ptr_stack_init_ex(zend_ptr_stack *stack, zend_bool persistent) +ZEND_API void zend_ptr_stack_init_ex(zend_ptr_stack *stack, bool persistent) { stack->top_element = stack->elements = NULL; stack->top = stack->max = 0; @@ -96,7 +96,7 @@ ZEND_API void zend_ptr_stack_reverse_apply(zend_ptr_stack *stack, void (*func)(v } -ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements) +ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), bool free_elements) { zend_ptr_stack_apply(stack, func); if (free_elements) { diff --git a/Zend/zend_ptr_stack.h b/Zend/zend_ptr_stack.h index 2298e4f211..fd4b59d151 100644 --- a/Zend/zend_ptr_stack.h +++ b/Zend/zend_ptr_stack.h @@ -24,7 +24,7 @@ typedef struct _zend_ptr_stack { int top, max; void **elements; void **top_element; - zend_bool persistent; + bool persistent; } zend_ptr_stack; @@ -32,13 +32,13 @@ typedef struct _zend_ptr_stack { BEGIN_EXTERN_C() ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack); -ZEND_API void zend_ptr_stack_init_ex(zend_ptr_stack *stack, zend_bool persistent); +ZEND_API void zend_ptr_stack_init_ex(zend_ptr_stack *stack, bool persistent); ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...); ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...); ZEND_API void zend_ptr_stack_destroy(zend_ptr_stack *stack); ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *)); ZEND_API void zend_ptr_stack_reverse_apply(zend_ptr_stack *stack, void (*func)(void *)); -ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements); +ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), bool free_elements); ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack); END_EXTERN_C() diff --git a/Zend/zend_signal.h b/Zend/zend_signal.h index 08c9de20c7..ed89851fa8 100644 --- a/Zend/zend_signal.h +++ b/Zend/zend_signal.h @@ -56,8 +56,8 @@ typedef struct _zend_signal_globals_t { int blocked; /* 1==TRUE, 0==FALSE */ int running; /* in signal handler execution */ int active; /* internal signal handling is enabled */ - zend_bool check; /* check for replaced handlers on shutdown */ - zend_bool reset; /* reset signal handlers on each request */ + bool check; /* check for replaced handlers on shutdown */ + bool reset; /* reset signal handlers on each request */ zend_signal_entry_t handlers[NSIG]; zend_signal_queue_t pstorage[ZEND_SIGNAL_QUEUE_SIZE], *phead, *ptail, *pavail; /* pending queue */ } zend_signal_globals_t; diff --git a/Zend/zend_smart_str.h b/Zend/zend_smart_str.h index 9211e54bee..756261e937 100644 --- a/Zend/zend_smart_str.h +++ b/Zend/zend_smart_str.h @@ -54,7 +54,7 @@ ZEND_API void smart_str_append_printf(smart_str *dest, const char *format, ...) END_EXTERN_C() -static zend_always_inline size_t smart_str_alloc(smart_str *str, size_t len, zend_bool persistent) { +static zend_always_inline size_t smart_str_alloc(smart_str *str, size_t len, bool persistent) { if (UNEXPECTED(!str->s)) { goto do_smart_str_realloc; } else { @@ -71,14 +71,14 @@ do_smart_str_realloc: return len; } -static zend_always_inline char* smart_str_extend_ex(smart_str *dest, size_t len, zend_bool persistent) { +static zend_always_inline char* smart_str_extend_ex(smart_str *dest, size_t len, bool persistent) { size_t new_len = smart_str_alloc(dest, len, persistent); char *ret = ZSTR_VAL(dest->s) + ZSTR_LEN(dest->s); ZSTR_LEN(dest->s) = new_len; return ret; } -static zend_always_inline void smart_str_free_ex(smart_str *str, zend_bool persistent) { +static zend_always_inline void smart_str_free_ex(smart_str *str, bool persistent) { if (str->s) { zend_string_release_ex(str->s, persistent); str->s = NULL; @@ -108,35 +108,35 @@ static zend_always_inline zend_string *smart_str_extract(smart_str *str) { } } -static zend_always_inline void smart_str_appendc_ex(smart_str *dest, char ch, zend_bool persistent) { +static zend_always_inline void smart_str_appendc_ex(smart_str *dest, char ch, bool persistent) { size_t new_len = smart_str_alloc(dest, 1, persistent); ZSTR_VAL(dest->s)[new_len - 1] = ch; ZSTR_LEN(dest->s) = new_len; } -static zend_always_inline void smart_str_appendl_ex(smart_str *dest, const char *str, size_t len, zend_bool persistent) { +static zend_always_inline void smart_str_appendl_ex(smart_str *dest, const char *str, size_t len, bool persistent) { size_t new_len = smart_str_alloc(dest, len, persistent); memcpy(ZSTR_VAL(dest->s) + ZSTR_LEN(dest->s), str, len); ZSTR_LEN(dest->s) = new_len; } -static zend_always_inline void smart_str_append_ex(smart_str *dest, const zend_string *src, zend_bool persistent) { +static zend_always_inline void smart_str_append_ex(smart_str *dest, const zend_string *src, bool persistent) { smart_str_appendl_ex(dest, ZSTR_VAL(src), ZSTR_LEN(src), persistent); } -static zend_always_inline void smart_str_append_smart_str_ex(smart_str *dest, const smart_str *src, zend_bool persistent) { +static zend_always_inline void smart_str_append_smart_str_ex(smart_str *dest, const smart_str *src, bool persistent) { if (src->s && ZSTR_LEN(src->s)) { smart_str_append_ex(dest, src->s, persistent); } } -static zend_always_inline void smart_str_append_long_ex(smart_str *dest, zend_long num, zend_bool persistent) { +static zend_always_inline void smart_str_append_long_ex(smart_str *dest, zend_long num, bool persistent) { char buf[32]; char *result = zend_print_long_to_buf(buf + sizeof(buf) - 1, num); smart_str_appendl_ex(dest, result, buf + sizeof(buf) - 1 - result, persistent); } -static zend_always_inline void smart_str_append_unsigned_ex(smart_str *dest, zend_ulong num, zend_bool persistent) { +static zend_always_inline void smart_str_append_unsigned_ex(smart_str *dest, zend_ulong num, bool persistent) { char buf[32]; char *result = zend_print_ulong_to_buf(buf + sizeof(buf) - 1, num); smart_str_appendl_ex(dest, result, buf + sizeof(buf) - 1 - result, persistent); diff --git a/Zend/zend_smart_string.h b/Zend/zend_smart_string.h index 1f74a63218..d9f484b91e 100644 --- a/Zend/zend_smart_string.h +++ b/Zend/zend_smart_string.h @@ -51,7 +51,7 @@ ZEND_API void ZEND_FASTCALL _smart_string_alloc_persistent(smart_string *str, size_t len); ZEND_API void ZEND_FASTCALL _smart_string_alloc(smart_string *str, size_t len); -static zend_always_inline size_t smart_string_alloc(smart_string *str, size_t len, zend_bool persistent) { +static zend_always_inline size_t smart_string_alloc(smart_string *str, size_t len, bool persistent) { if (UNEXPECTED(!str->c) || UNEXPECTED(len >= str->a - str->len)) { if (persistent) { _smart_string_alloc_persistent(str, len); @@ -62,7 +62,7 @@ static zend_always_inline size_t smart_string_alloc(smart_string *str, size_t le return str->len + len; } -static zend_always_inline void smart_string_free_ex(smart_string *str, zend_bool persistent) { +static zend_always_inline void smart_string_free_ex(smart_string *str, bool persistent) { if (str->c) { pefree(str->c, persistent); str->c = NULL; @@ -76,25 +76,25 @@ static zend_always_inline void smart_string_0(smart_string *str) { } } -static zend_always_inline void smart_string_appendc_ex(smart_string *dest, char ch, zend_bool persistent) { +static zend_always_inline void smart_string_appendc_ex(smart_string *dest, char ch, bool persistent) { dest->len = smart_string_alloc(dest, 1, persistent); dest->c[dest->len - 1] = ch; } -static zend_always_inline void smart_string_appendl_ex(smart_string *dest, const char *str, size_t len, zend_bool persistent) { +static zend_always_inline void smart_string_appendl_ex(smart_string *dest, const char *str, size_t len, bool persistent) { size_t new_len = smart_string_alloc(dest, len, persistent); memcpy(dest->c + dest->len, str, len); dest->len = new_len; } -static zend_always_inline void smart_string_append_long_ex(smart_string *dest, zend_long num, zend_bool persistent) { +static zend_always_inline void smart_string_append_long_ex(smart_string *dest, zend_long num, bool persistent) { char buf[32]; char *result = zend_print_long_to_buf(buf + sizeof(buf) - 1, num); smart_string_appendl_ex(dest, result, buf + sizeof(buf) - 1 - result, persistent); } -static zend_always_inline void smart_string_append_unsigned_ex(smart_string *dest, zend_ulong num, zend_bool persistent) { +static zend_always_inline void smart_string_append_unsigned_ex(smart_string *dest, zend_ulong num, bool persistent) { char buf[32]; char *result = zend_print_ulong_to_buf(buf + sizeof(buf) - 1, num); smart_string_appendl_ex(dest, result, buf + sizeof(buf) - 1 - result, persistent); diff --git a/Zend/zend_stack.c b/Zend/zend_stack.c index 1255c941a0..f587452bb7 100644 --- a/Zend/zend_stack.c +++ b/Zend/zend_stack.c @@ -141,7 +141,7 @@ ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (* } } -ZEND_API void zend_stack_clean(zend_stack *stack, void (*func)(void *), zend_bool free_elements) +ZEND_API void zend_stack_clean(zend_stack *stack, void (*func)(void *), bool free_elements) { int i; diff --git a/Zend/zend_stack.h b/Zend/zend_stack.h index a5aa962226..c0a325b778 100644 --- a/Zend/zend_stack.h +++ b/Zend/zend_stack.h @@ -40,7 +40,7 @@ ZEND_API void *zend_stack_base(const zend_stack *stack); ZEND_API int zend_stack_count(const zend_stack *stack); ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element)); ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg); -ZEND_API void zend_stack_clean(zend_stack *stack, void (*func)(void *), zend_bool free_elements); +ZEND_API void zend_stack_clean(zend_stack *stack, void (*func)(void *), bool free_elements); END_EXTERN_C() #define ZEND_STACK_APPLY_TOPDOWN 1 diff --git a/Zend/zend_stream.h b/Zend/zend_stream.h index 023e2d0555..e97a796730 100644 --- a/Zend/zend_stream.h +++ b/Zend/zend_stream.h @@ -58,7 +58,7 @@ typedef struct _zend_file_handle { zend_stream_type type; /* free_filename is used by wincache */ /* TODO: Clean up filename vs opened_path mess */ - zend_bool free_filename; + bool free_filename; char *buf; size_t len; } zend_file_handle; diff --git a/Zend/zend_string.c b/Zend/zend_string.c index 570aeece61..ab074515aa 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -313,7 +313,7 @@ ZEND_API void zend_interned_strings_set_request_storage_handlers(zend_new_intern interned_string_init_request_handler = init_handler; } -ZEND_API void zend_interned_strings_switch_storage(zend_bool request) +ZEND_API void zend_interned_strings_switch_storage(bool request) { if (request) { zend_new_interned_string = interned_string_request_handler; @@ -325,7 +325,7 @@ ZEND_API void zend_interned_strings_switch_storage(zend_bool request) } #if defined(__GNUC__) && defined(__i386__) -ZEND_API zend_bool ZEND_FASTCALL zend_string_equal_val(zend_string *s1, zend_string *s2) +ZEND_API bool ZEND_FASTCALL zend_string_equal_val(zend_string *s1, zend_string *s2) { char *ptr = ZSTR_VAL(s1); size_t delta = (char*)s2 - (char*)s1; @@ -363,7 +363,7 @@ ZEND_API zend_bool ZEND_FASTCALL zend_string_equal_val(zend_string *s1, zend_str } #ifdef HAVE_VALGRIND -ZEND_API zend_bool ZEND_FASTCALL I_WRAP_SONAME_FNNAME_ZU(NONE,zend_string_equal_val)(zend_string *s1, zend_string *s2) +ZEND_API bool ZEND_FASTCALL I_WRAP_SONAME_FNNAME_ZU(NONE,zend_string_equal_val)(zend_string *s1, zend_string *s2) { size_t len = ZSTR_LEN(s1); char *ptr1 = ZSTR_VAL(s1); @@ -393,7 +393,7 @@ ZEND_API zend_bool ZEND_FASTCALL I_WRAP_SONAME_FNNAME_ZU(NONE,zend_string_equal_ #endif #elif defined(__GNUC__) && defined(__x86_64__) && !defined(__ILP32__) -ZEND_API zend_bool ZEND_FASTCALL zend_string_equal_val(zend_string *s1, zend_string *s2) +ZEND_API bool ZEND_FASTCALL zend_string_equal_val(zend_string *s1, zend_string *s2) { char *ptr = ZSTR_VAL(s1); size_t delta = (char*)s2 - (char*)s1; @@ -431,7 +431,7 @@ ZEND_API zend_bool ZEND_FASTCALL zend_string_equal_val(zend_string *s1, zend_str } #ifdef HAVE_VALGRIND -ZEND_API zend_bool ZEND_FASTCALL I_WRAP_SONAME_FNNAME_ZU(NONE,zend_string_equal_val)(zend_string *s1, zend_string *s2) +ZEND_API bool ZEND_FASTCALL I_WRAP_SONAME_FNNAME_ZU(NONE,zend_string_equal_val)(zend_string *s1, zend_string *s2) { size_t len = ZSTR_LEN(s1); char *ptr1 = ZSTR_VAL(s1); diff --git a/Zend/zend_string.h b/Zend/zend_string.h index 96f1a6f4a0..c7580d63a4 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -47,7 +47,7 @@ ZEND_API void zend_interned_strings_dtor(void); ZEND_API void zend_interned_strings_activate(void); ZEND_API void zend_interned_strings_deactivate(void); ZEND_API void zend_interned_strings_set_request_storage_handlers(zend_new_interned_string_func_t handler, zend_string_init_interned_func_t init_handler); -ZEND_API void zend_interned_strings_switch_storage(zend_bool request); +ZEND_API void zend_interned_strings_switch_storage(bool request); ZEND_API extern zend_string *zend_empty_string; ZEND_API extern zend_string *zend_one_char_string[256]; @@ -332,21 +332,21 @@ static zend_always_inline void zend_string_release_ex(zend_string *s, bool persi #if defined(__GNUC__) && (defined(__i386__) || (defined(__x86_64__) && !defined(__ILP32__))) BEGIN_EXTERN_C() -ZEND_API zend_bool ZEND_FASTCALL zend_string_equal_val(zend_string *s1, zend_string *s2); +ZEND_API bool ZEND_FASTCALL zend_string_equal_val(zend_string *s1, zend_string *s2); END_EXTERN_C() #else -static zend_always_inline zend_bool zend_string_equal_val(zend_string *s1, zend_string *s2) +static zend_always_inline bool zend_string_equal_val(zend_string *s1, zend_string *s2) { return !memcmp(ZSTR_VAL(s1), ZSTR_VAL(s2), ZSTR_LEN(s1)); } #endif -static zend_always_inline zend_bool zend_string_equal_content(zend_string *s1, zend_string *s2) +static zend_always_inline bool zend_string_equal_content(zend_string *s1, zend_string *s2) { return ZSTR_LEN(s1) == ZSTR_LEN(s2) && zend_string_equal_val(s1, s2); } -static zend_always_inline zend_bool zend_string_equals(zend_string *s1, zend_string *s2) +static zend_always_inline bool zend_string_equals(zend_string *s1, zend_string *s2) { return s1 == s2 || zend_string_equal_content(s1, s2); } diff --git a/Zend/zend_ts_hash.c b/Zend/zend_ts_hash.c index d4e972d0e3..9bbf42c66d 100644 --- a/Zend/zend_ts_hash.c +++ b/Zend/zend_ts_hash.c @@ -57,7 +57,7 @@ static void end_write(TsHashTable *ht) } /* delegates */ -ZEND_API void zend_ts_hash_init(TsHashTable *ht, uint32_t nSize, dtor_func_t pDestructor, zend_bool persistent) +ZEND_API void zend_ts_hash_init(TsHashTable *ht, uint32_t nSize, dtor_func_t pDestructor, bool persistent) { #ifdef ZTS ht->mx_reader = tsrm_mutex_alloc(); @@ -271,7 +271,7 @@ ZEND_API void zend_ts_hash_sort(TsHashTable *ht, sort_func_t sort_func, bucket_c end_write(ht); } -ZEND_API int zend_ts_hash_compare(TsHashTable *ht1, TsHashTable *ht2, compare_func_t compar, zend_bool ordered) +ZEND_API int zend_ts_hash_compare(TsHashTable *ht1, TsHashTable *ht2, compare_func_t compar, bool ordered) { int retval; diff --git a/Zend/zend_ts_hash.h b/Zend/zend_ts_hash.h index d1b41b1d6f..12d3c65eb1 100644 --- a/Zend/zend_ts_hash.h +++ b/Zend/zend_ts_hash.h @@ -35,7 +35,7 @@ BEGIN_EXTERN_C() #define TS_HASH(table) (&(table->hash)) /* startup/shutdown */ -ZEND_API void zend_ts_hash_init(TsHashTable *ht, uint32_t nSize, dtor_func_t pDestructor, zend_bool persistent); +ZEND_API void zend_ts_hash_init(TsHashTable *ht, uint32_t nSize, dtor_func_t pDestructor, bool persistent); ZEND_API void zend_ts_hash_destroy(TsHashTable *ht); ZEND_API void zend_ts_hash_clean(TsHashTable *ht); @@ -69,7 +69,7 @@ ZEND_API void zend_ts_hash_copy_to_hash(HashTable *target, TsHashTable *source, ZEND_API void zend_ts_hash_merge(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, bool overwrite); ZEND_API void zend_ts_hash_merge_ex(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, merge_checker_func_t pMergeSource, void *pParam); ZEND_API void zend_ts_hash_sort(TsHashTable *ht, sort_func_t sort_func, bucket_compare_func_t compare_func, bool renumber); -ZEND_API int zend_ts_hash_compare(TsHashTable *ht1, TsHashTable *ht2, compare_func_t compar, zend_bool ordered); +ZEND_API int zend_ts_hash_compare(TsHashTable *ht1, TsHashTable *ht2, compare_func_t compar, bool ordered); ZEND_API zval *zend_ts_hash_minmax(TsHashTable *ht, bucket_compare_func_t compar, int flag); ZEND_API int zend_ts_hash_num_elements(TsHashTable *ht); diff --git a/Zend/zend_types.h b/Zend/zend_types.h index 7f2fdae439..da6792ba7b 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -1130,7 +1130,7 @@ static zend_always_inline uint32_t zval_gc_info(uint32_t gc_type_info) { #endif #if ZEND_RC_DEBUG -extern ZEND_API zend_bool zend_rc_debug; +extern ZEND_API bool zend_rc_debug; # define ZEND_RC_MOD_CHECK(p) do { \ if (zend_rc_debug && zval_gc_type((p)->u.type_info) != IS_OBJECT) { \ ZEND_ASSERT(!(zval_gc_flags((p)->u.type_info) & GC_IMMUTABLE)); \ diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 3921a7eae0..60b1ac3b90 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -446,7 +446,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(16, ZEND_IS_IDENTICAL, CONST|TMP|VAR|CV, CONST|T { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R); @@ -461,7 +461,7 @@ ZEND_VM_HANDLER(196, ZEND_CASE_STRICT, TMP|VAR, CONST|TMP|VAR|CV) { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R); @@ -475,7 +475,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(17, ZEND_IS_NOT_IDENTICAL, CONST|TMP|VAR|CV, CON { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R); @@ -3894,7 +3894,7 @@ ZEND_VM_HOT_HANDLER(129, ZEND_DO_ICALL, ANY, ANY, SPEC(RETVAL)) EG(current_execute_data) = call; #if ZEND_DEBUG - zend_bool should_throw = zend_internal_call_should_throw(fbc, call); + bool should_throw = zend_internal_call_should_throw(fbc, call); #endif ret = RETURN_VALUE_USED(opline) ? EX_VAR(opline->result.var) : &retval; @@ -4012,7 +4012,7 @@ ZEND_VM_HOT_HANDLER(131, ZEND_DO_FCALL_BY_NAME, ANY, ANY, SPEC(RETVAL,OBSERVER)) EG(current_execute_data) = call; #if ZEND_DEBUG - zend_bool should_throw = zend_internal_call_should_throw(fbc, call); + bool should_throw = zend_internal_call_should_throw(fbc, call); #endif ret = RETURN_VALUE_USED(opline) ? EX_VAR(opline->result.var) : &retval; @@ -4116,7 +4116,7 @@ ZEND_VM_HOT_HANDLER(60, ZEND_DO_FCALL, ANY, ANY, SPEC(RETVAL,OBSERVER)) EG(current_execute_data) = call; #if ZEND_DEBUG - zend_bool should_throw = zend_internal_call_should_throw(fbc, call); + bool should_throw = zend_internal_call_should_throw(fbc, call); #endif ret = RETURN_VALUE_USED(opline) ? EX_VAR(opline->result.var) : &retval; @@ -5004,7 +5004,7 @@ ZEND_VM_C_LABEL(send_again): HashTable *ht = Z_ARRVAL_P(args); zval *arg, *top; zend_string *name; - zend_bool have_named_params = 0; + bool have_named_params = 0; zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, zend_hash_num_elements(ht)); @@ -5075,7 +5075,7 @@ ZEND_VM_C_LABEL(send_again): } else if (EXPECTED(Z_TYPE_P(args) == IS_OBJECT)) { zend_class_entry *ce = Z_OBJCE_P(args); zend_object_iterator *iter; - zend_bool have_named_params = 0; + bool have_named_params = 0; if (!ce || !ce->get_iterator) { zend_type_error("Only arrays and Traversables can be unpacked"); @@ -5237,7 +5237,7 @@ ZEND_VM_C_LABEL(send_array): arg_num = 1; param = ZEND_CALL_ARG(EX(call), 1); ZEND_HASH_FOREACH_VAL(ht, arg) { - zend_bool must_wrap = 0; + bool must_wrap = 0; if (skip > 0) { skip--; continue; @@ -5273,7 +5273,7 @@ ZEND_VM_C_LABEL(send_array): FREE_OP2(); } else { zend_string *name; - zend_bool have_named_params; + bool have_named_params; zend_vm_stack_extend_call_frame(&EX(call), 0, zend_hash_num_elements(ht)); arg_num = 1; param = ZEND_CALL_ARG(EX(call), 1); @@ -5294,7 +5294,7 @@ ZEND_VM_C_LABEL(send_array): HANDLE_EXCEPTION(); } - zend_bool must_wrap = 0; + bool must_wrap = 0; if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) { if (UNEXPECTED(!Z_ISREF_P(arg))) { if (!ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num)) { @@ -6527,7 +6527,7 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET_R, CONST|TMP|VAR|CV, JMP_ADDR) FREE_OP1_IF_VAR(); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else { - zend_bool is_empty = zend_fe_reset_iterator(array_ptr, 0 OPLINE_CC EXECUTE_DATA_CC); + bool is_empty = zend_fe_reset_iterator(array_ptr, 0 OPLINE_CC EXECUTE_DATA_CC); FREE_OP1(); if (UNEXPECTED(EG(exception))) { @@ -6620,7 +6620,7 @@ ZEND_VM_COLD_CONST_HANDLER(125, ZEND_FE_RESET_RW, CONST|TMP|VAR|CV, JMP_ADDR) FREE_OP1_VAR_PTR(); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else { - zend_bool is_empty = zend_fe_reset_iterator(array_ptr, 1 OPLINE_CC EXECUTE_DATA_CC); + bool is_empty = zend_fe_reset_iterator(array_ptr, 1 OPLINE_CC EXECUTE_DATA_CC); if (OP1_TYPE == IS_VAR) { FREE_OP1_VAR_PTR(); @@ -7188,7 +7188,7 @@ ZEND_VM_HANDLER(194, ZEND_ARRAY_KEY_EXISTS, CV|TMPVAR|CONST, CV|TMPVAR|CONST) zval *key, *subject; HashTable *ht; - zend_bool result; + bool result; SAVE_OPLINE(); @@ -7594,7 +7594,7 @@ ZEND_VM_HANDLER(138, ZEND_INSTANCEOF, TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR, C { USE_OPLINE zval *expr; - zend_bool result; + bool result; SAVE_OPLINE(); expr = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); @@ -8276,7 +8276,7 @@ ZEND_VM_COLD_CONST_HANDLER(121, ZEND_STRLEN, CONST|TMPVAR|CV, ANY) FREE_OP1(); ZEND_VM_NEXT_OPCODE(); } else { - zend_bool strict; + bool strict; if ((OP1_TYPE & (IS_VAR|IS_CV)) && Z_TYPE_P(value) == IS_REFERENCE) { value = Z_REFVAL_P(value); @@ -8530,7 +8530,7 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY, SPEC(OBSERVER)) EG(current_execute_data) = call; #if ZEND_DEBUG - zend_bool should_throw = zend_internal_call_should_throw(fbc, call); + bool should_throw = zend_internal_call_should_throw(fbc, call); #endif if (ret == NULL) { @@ -9297,7 +9297,7 @@ ZEND_VM_TYPE_SPEC_HANDLER(ZEND_IS_IDENTICAL, op->op1_type == IS_CV && (op->op2_t /* (Infinite recursion when comparing arrays is an uncatchable fatal error) */ USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R); @@ -9310,7 +9310,7 @@ ZEND_VM_TYPE_SPEC_HANDLER(ZEND_IS_NOT_IDENTICAL, op->op1_type == IS_CV && (op->o { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 86edae867b..2046afba55 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -1225,7 +1225,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_ICALL_SPEC_RETV EG(current_execute_data) = call; #if ZEND_DEBUG - zend_bool should_throw = zend_internal_call_should_throw(fbc, call); + bool should_throw = zend_internal_call_should_throw(fbc, call); #endif ret = 0 ? EX_VAR(opline->result.var) : &retval; @@ -1286,7 +1286,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_ICALL_SPEC_RETV EG(current_execute_data) = call; #if ZEND_DEBUG - zend_bool should_throw = zend_internal_call_should_throw(fbc, call); + bool should_throw = zend_internal_call_should_throw(fbc, call); #endif ret = 1 ? EX_VAR(opline->result.var) : &retval; @@ -1451,7 +1451,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_S EG(current_execute_data) = call; #if ZEND_DEBUG - zend_bool should_throw = zend_internal_call_should_throw(fbc, call); + bool should_throw = zend_internal_call_should_throw(fbc, call); #endif ret = 0 ? EX_VAR(opline->result.var) : &retval; @@ -1545,7 +1545,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_S EG(current_execute_data) = call; #if ZEND_DEBUG - zend_bool should_throw = zend_internal_call_should_throw(fbc, call); + bool should_throw = zend_internal_call_should_throw(fbc, call); #endif ret = 1 ? EX_VAR(opline->result.var) : &retval; @@ -1640,7 +1640,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_ EG(current_execute_data) = call; #if ZEND_DEBUG - zend_bool should_throw = zend_internal_call_should_throw(fbc, call); + bool should_throw = zend_internal_call_should_throw(fbc, call); #endif ret = RETURN_VALUE_USED(opline) ? EX_VAR(opline->result.var) : &retval; @@ -1744,7 +1744,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETV EG(current_execute_data) = call; #if ZEND_DEBUG - zend_bool should_throw = zend_internal_call_should_throw(fbc, call); + bool should_throw = zend_internal_call_should_throw(fbc, call); #endif ret = 0 ? EX_VAR(opline->result.var) : &retval; @@ -1852,7 +1852,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETV EG(current_execute_data) = call; #if ZEND_DEBUG - zend_bool should_throw = zend_internal_call_should_throw(fbc, call); + bool should_throw = zend_internal_call_should_throw(fbc, call); #endif ret = 1 ? EX_VAR(opline->result.var) : &retval; @@ -1960,7 +1960,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_OBS EG(current_execute_data) = call; #if ZEND_DEBUG - zend_bool should_throw = zend_internal_call_should_throw(fbc, call); + bool should_throw = zend_internal_call_should_throw(fbc, call); #endif ret = RETURN_VALUE_USED(opline) ? EX_VAR(opline->result.var) : &retval; @@ -2115,7 +2115,7 @@ send_again: HashTable *ht = Z_ARRVAL_P(args); zval *arg, *top; zend_string *name; - zend_bool have_named_params = 0; + bool have_named_params = 0; zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, zend_hash_num_elements(ht)); @@ -2186,7 +2186,7 @@ send_again: } else if (EXPECTED(Z_TYPE_P(args) == IS_OBJECT)) { zend_class_entry *ce = Z_OBJCE_P(args); zend_object_iterator *iter; - zend_bool have_named_params = 0; + bool have_named_params = 0; if (!ce || !ce->get_iterator) { zend_type_error("Only arrays and Traversables can be unpacked"); @@ -2348,7 +2348,7 @@ send_array: arg_num = 1; param = ZEND_CALL_ARG(EX(call), 1); ZEND_HASH_FOREACH_VAL(ht, arg) { - zend_bool must_wrap = 0; + bool must_wrap = 0; if (skip > 0) { skip--; continue; @@ -2384,7 +2384,7 @@ send_array: FREE_OP(opline->op2_type, opline->op2.var); } else { zend_string *name; - zend_bool have_named_params; + bool have_named_params; zend_vm_stack_extend_call_frame(&EX(call), 0, zend_hash_num_elements(ht)); arg_num = 1; param = ZEND_CALL_ARG(EX(call), 1); @@ -2405,7 +2405,7 @@ send_array: HANDLE_EXCEPTION(); } - zend_bool must_wrap = 0; + bool must_wrap = 0; if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) { if (UNEXPECTED(!Z_ISREF_P(arg))) { if (!ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num)) { @@ -3167,7 +3167,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z EG(current_execute_data) = call; #if ZEND_DEBUG - zend_bool should_throw = zend_internal_call_should_throw(fbc, call); + bool should_throw = zend_internal_call_should_throw(fbc, call); #endif if (ret == NULL) { @@ -3303,7 +3303,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_OBSERVER_ EG(current_execute_data) = call; #if ZEND_DEBUG - zend_bool should_throw = zend_internal_call_should_throw(fbc, call); + bool should_throw = zend_internal_call_should_throw(fbc, call); #endif if (ret == NULL) { @@ -4851,7 +4851,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CONST_HANDLER( ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else { - zend_bool is_empty = zend_fe_reset_iterator(array_ptr, 0 OPLINE_CC EXECUTE_DATA_CC); + bool is_empty = zend_fe_reset_iterator(array_ptr, 0 OPLINE_CC EXECUTE_DATA_CC); if (UNEXPECTED(EG(exception))) { HANDLE_EXCEPTION(); @@ -4943,7 +4943,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else { - zend_bool is_empty = zend_fe_reset_iterator(array_ptr, 1 OPLINE_CC EXECUTE_DATA_CC); + bool is_empty = zend_fe_reset_iterator(array_ptr, 1 OPLINE_CC EXECUTE_DATA_CC); if (IS_CONST == IS_VAR) { @@ -5254,7 +5254,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CONST ZEND_VM_NEXT_OPCODE(); } else { - zend_bool strict; + bool strict; if ((IS_CONST & (IS_VAR|IS_CV)) && Z_TYPE_P(value) == IS_REFERENCE) { value = Z_REFVAL_P(value); @@ -5624,7 +5624,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = RT_CONSTANT(opline, opline->op1); @@ -5639,7 +5639,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_ { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = RT_CONSTANT(opline, opline->op1); @@ -7121,7 +7121,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ARRAY_KEY_EXISTS_SPEC_CONST_CO zval *key, *subject; HashTable *ht; - zend_bool result; + bool result; SAVE_OPLINE(); @@ -9277,7 +9277,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ARRAY_KEY_EXISTS_SPEC_CONST_TM zval *key, *subject; HashTable *ht; - zend_bool result; + bool result; SAVE_OPLINE(); @@ -11661,7 +11661,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ARRAY_KEY_EXISTS_SPEC_CONST_CV zval *key, *subject; HashTable *ht; - zend_bool result; + bool result; SAVE_OPLINE(); @@ -14426,7 +14426,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_TMPVAR_HANDLER(ZEN zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); ZEND_VM_NEXT_OPCODE(); } else { - zend_bool strict; + bool strict; if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && Z_TYPE_P(value) == IS_REFERENCE) { value = Z_REFVAL_P(value); @@ -15807,7 +15807,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_C zval *key, *subject; HashTable *ht; - zend_bool result; + bool result; SAVE_OPLINE(); @@ -15838,7 +15838,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_TMPVAR_CONST_H { USE_OPLINE zval *expr; - zend_bool result; + bool result; SAVE_OPLINE(); expr = _get_zval_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -17199,7 +17199,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_T zval *key, *subject; HashTable *ht; - zend_bool result; + bool result; SAVE_OPLINE(); @@ -17231,7 +17231,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_TMPVAR_VAR_HAN { USE_OPLINE zval *expr; - zend_bool result; + bool result; SAVE_OPLINE(); expr = _get_zval_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -17514,7 +17514,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_TMPVAR_UNUSED_ { USE_OPLINE zval *expr; - zend_bool result; + bool result; SAVE_OPLINE(); expr = _get_zval_ptr_var(opline->op1.var EXECUTE_DATA_CC); @@ -18511,7 +18511,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ARRAY_KEY_EXISTS_SPEC_TMPVAR_C zval *key, *subject; HashTable *ht; - zend_bool result; + bool result; SAVE_OPLINE(); @@ -18875,7 +18875,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_TMP_HANDLER(ZE ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else { - zend_bool is_empty = zend_fe_reset_iterator(array_ptr, 0 OPLINE_CC EXECUTE_DATA_CC); + bool is_empty = zend_fe_reset_iterator(array_ptr, 0 OPLINE_CC EXECUTE_DATA_CC); zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); if (UNEXPECTED(EG(exception))) { @@ -18968,7 +18968,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_TMP_HANDLER(Z ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else { - zend_bool is_empty = zend_fe_reset_iterator(array_ptr, 1 OPLINE_CC EXECUTE_DATA_CC); + bool is_empty = zend_fe_reset_iterator(array_ptr, 1 OPLINE_CC EXECUTE_DATA_CC); if (IS_TMP_VAR == IS_VAR) { @@ -19137,7 +19137,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HA { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_tmp(opline->op1.var EXECUTE_DATA_CC); @@ -19152,7 +19152,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_TMP_CONST_HAN { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_tmp(opline->op1.var EXECUTE_DATA_CC); @@ -19166,7 +19166,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONS { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_tmp(opline->op1.var EXECUTE_DATA_CC); @@ -19989,7 +19989,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_TMP_HAND { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_tmp(opline->op1.var EXECUTE_DATA_CC); @@ -20004,7 +20004,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_TMP_TMP_HANDL { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_tmp(opline->op1.var EXECUTE_DATA_CC); @@ -20018,7 +20018,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP_ { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_tmp(opline->op1.var EXECUTE_DATA_CC); @@ -20033,7 +20033,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_TMP_VAR_HANDL { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_tmp(opline->op1.var EXECUTE_DATA_CC); @@ -20466,7 +20466,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_TMP_CV_HANDLE { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_tmp(opline->op1.var EXECUTE_DATA_CC); @@ -21450,7 +21450,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_VAR_HANDLER(ZE zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else { - zend_bool is_empty = zend_fe_reset_iterator(array_ptr, 0 OPLINE_CC EXECUTE_DATA_CC); + bool is_empty = zend_fe_reset_iterator(array_ptr, 0 OPLINE_CC EXECUTE_DATA_CC); zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); if (UNEXPECTED(EG(exception))) { @@ -21543,7 +21543,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_VAR_HANDLER(Z zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else { - zend_bool is_empty = zend_fe_reset_iterator(array_ptr, 1 OPLINE_CC EXECUTE_DATA_CC); + bool is_empty = zend_fe_reset_iterator(array_ptr, 1 OPLINE_CC EXECUTE_DATA_CC); if (IS_VAR == IS_VAR) { zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -22034,7 +22034,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_CONST_HA { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var EXECUTE_DATA_CC); @@ -22049,7 +22049,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_VAR_CONST_HAN { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var EXECUTE_DATA_CC); @@ -22063,7 +22063,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CONS { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var EXECUTE_DATA_CC); @@ -26743,7 +26743,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_TMP_HAND { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var EXECUTE_DATA_CC); @@ -26758,7 +26758,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_VAR_TMP_HANDL { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var EXECUTE_DATA_CC); @@ -26772,7 +26772,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_TMP_ { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var EXECUTE_DATA_CC); @@ -26827,7 +26827,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_VAR_HAND { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var EXECUTE_DATA_CC); @@ -26842,7 +26842,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_VAR_VAR_HANDL { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var EXECUTE_DATA_CC); @@ -26856,7 +26856,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_VAR_ { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var EXECUTE_DATA_CC); @@ -28554,7 +28554,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_VAR_CV_HANDLE { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_var_deref(opline->op1.var EXECUTE_DATA_CC); @@ -38151,7 +38151,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CV_HANDLER(ZEN ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else { - zend_bool is_empty = zend_fe_reset_iterator(array_ptr, 0 OPLINE_CC EXECUTE_DATA_CC); + bool is_empty = zend_fe_reset_iterator(array_ptr, 0 OPLINE_CC EXECUTE_DATA_CC); if (UNEXPECTED(EG(exception))) { HANDLE_EXCEPTION(); @@ -38243,7 +38243,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CV_HANDLER(ZE ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else { - zend_bool is_empty = zend_fe_reset_iterator(array_ptr, 1 OPLINE_CC EXECUTE_DATA_CC); + bool is_empty = zend_fe_reset_iterator(array_ptr, 1 OPLINE_CC EXECUTE_DATA_CC); if (IS_CV == IS_VAR) { @@ -38510,7 +38510,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CV_HANDLER(ZEND_OP ZEND_VM_NEXT_OPCODE(); } else { - zend_bool strict; + bool strict; if ((IS_CV & (IS_VAR|IS_CV)) && Z_TYPE_P(value) == IS_REFERENCE) { value = Z_REFVAL_P(value); @@ -38915,7 +38915,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_CONST_HAN { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); @@ -38930,7 +38930,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_CONST { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); @@ -42022,7 +42022,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ARRAY_KEY_EXISTS_SPEC_CV_CONST zval *key, *subject; HashTable *ht; - zend_bool result; + bool result; SAVE_OPLINE(); @@ -42053,7 +42053,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_CV_CONST_HANDL { USE_OPLINE zval *expr; - zend_bool result; + bool result; SAVE_OPLINE(); expr = EX_VAR(opline->op1.var); @@ -42341,7 +42341,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_NOTHROW_SPEC_CV_C /* (Infinite recursion when comparing arrays is an uncatchable fatal error) */ USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; op1 = EX_VAR(opline->op1.var); op2 = RT_CONSTANT(opline, opline->op2); @@ -42354,7 +42354,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_NOTHROW_SPEC_ { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; op1 = EX_VAR(opline->op1.var); op2 = RT_CONSTANT(opline, opline->op2); @@ -45467,7 +45467,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ARRAY_KEY_EXISTS_SPEC_CV_TMPVA zval *key, *subject; HashTable *ht; - zend_bool result; + bool result; SAVE_OPLINE(); @@ -45623,7 +45623,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_TMP_HANDL { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); @@ -45638,7 +45638,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_TMP_H { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); @@ -45693,7 +45693,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_VAR_HANDL { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); @@ -45708,7 +45708,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_VAR_H { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); @@ -45798,7 +45798,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_CV_VAR_HANDLER { USE_OPLINE zval *expr; - zend_bool result; + bool result; SAVE_OPLINE(); expr = EX_VAR(opline->op1.var); @@ -47092,7 +47092,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_CV_UNUSED_HAND { USE_OPLINE zval *expr; - zend_bool result; + bool result; SAVE_OPLINE(); expr = EX_VAR(opline->op1.var); @@ -47592,7 +47592,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_CV_HANDLE { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); @@ -47607,7 +47607,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_CV_HA { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; SAVE_OPLINE(); op1 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC); @@ -50587,7 +50587,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ARRAY_KEY_EXISTS_SPEC_CV_CV_HA zval *key, *subject; HashTable *ht; - zend_bool result; + bool result; SAVE_OPLINE(); @@ -50744,7 +50744,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_NOTHROW_SPEC_CV_C /* (Infinite recursion when comparing arrays is an uncatchable fatal error) */ USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; op1 = EX_VAR(opline->op1.var); op2 = EX_VAR(opline->op2.var); @@ -50757,7 +50757,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_NOTHROW_SPEC_ { USE_OPLINE zval *op1, *op2; - zend_bool result; + bool result; op1 = EX_VAR(opline->op1.var); op2 = EX_VAR(opline->op2.var); diff --git a/Zend/zend_weakrefs.c b/Zend/zend_weakrefs.c index 1d225f735b..757d081349 100644 --- a/Zend/zend_weakrefs.c +++ b/Zend/zend_weakrefs.c @@ -181,7 +181,7 @@ static zend_object* zend_weakref_new(zend_class_entry *ce) { return &wr->std; } -static zend_always_inline zend_bool zend_weakref_find(zend_object *referent, zval *return_value) { +static zend_always_inline bool zend_weakref_find(zend_object *referent, zval *return_value) { void *tagged_ptr = zend_hash_index_find_ptr(&EG(weakrefs), (zend_ulong) referent); if (!tagged_ptr) { return 0; diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c index 870749af50..0e6e201458 100644 --- a/ext/bcmath/bcmath.c +++ b/ext/bcmath/bcmath.c @@ -154,7 +154,7 @@ PHP_FUNCTION(bcadd) { zend_string *left, *right; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second, result; int scale; @@ -205,7 +205,7 @@ PHP_FUNCTION(bcsub) { zend_string *left, *right; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second, result; int scale; @@ -256,7 +256,7 @@ PHP_FUNCTION(bcmul) { zend_string *left, *right; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second, result; int scale; @@ -307,7 +307,7 @@ PHP_FUNCTION(bcdiv) { zend_string *left, *right; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second, result; int scale = BCG(bc_precision); @@ -363,7 +363,7 @@ PHP_FUNCTION(bcmod) { zend_string *left, *right; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second, result; int scale = BCG(bc_precision); @@ -419,7 +419,7 @@ PHP_FUNCTION(bcpowmod) { zend_string *left, *right, *modulus; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second, mod, result; int scale = BCG(bc_precision); @@ -478,7 +478,7 @@ PHP_FUNCTION(bcpow) { zend_string *left, *right; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second, result; int scale = BCG(bc_precision); @@ -529,7 +529,7 @@ PHP_FUNCTION(bcsqrt) { zend_string *left; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num result; int scale = BCG(bc_precision); @@ -572,7 +572,7 @@ PHP_FUNCTION(bccomp) { zend_string *left, *right; zend_long scale_param; - zend_bool scale_param_is_null = 1; + bool scale_param_is_null = 1; bc_num first, second; int scale = BCG(bc_precision); @@ -618,7 +618,7 @@ PHP_FUNCTION(bccomp) PHP_FUNCTION(bcscale) { zend_long old_scale, new_scale; - zend_bool new_scale_is_null = 1; + bool new_scale_is_null = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index d83853aef9..5f6f37ff33 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -496,7 +496,7 @@ PHP_FUNCTION(bzdecompress) zend_string *dest; size_t source_len; int error; - zend_bool small = 0; + bool small = 0; #ifdef PHP_WIN32 unsigned __int64 size = 0; #else diff --git a/ext/calendar/cal_unix.c b/ext/calendar/cal_unix.c index f1740c86af..4a74170b51 100644 --- a/ext/calendar/cal_unix.c +++ b/ext/calendar/cal_unix.c @@ -28,7 +28,7 @@ PHP_FUNCTION(unixtojd) { time_t ts; zend_long tl = 0; - zend_bool tl_is_null = 1; + bool tl_is_null = 1; struct tm *ta, tmbuf; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &tl, &tl_is_null) == FAILURE) { diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c index 5dd4f1ef49..61ceecd6fc 100644 --- a/ext/calendar/calendar.c +++ b/ext/calendar/calendar.c @@ -474,7 +474,7 @@ static char *heb_number_to_chars(int n, int fl, char **ret) PHP_FUNCTION(jdtojewish) { zend_long julday, fl = 0; - zend_bool heb = 0; + bool heb = 0; int year, month, day; char *dayp, *yearp; diff --git a/ext/calendar/easter.c b/ext/calendar/easter.c index 291fd4a272..ffca84b8e6 100644 --- a/ext/calendar/easter.c +++ b/ext/calendar/easter.c @@ -28,7 +28,7 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, zend_long gm) struct tm te; zend_long year, golden, solar, lunar, pfm, dom, tmp, easter, result; zend_long method = CAL_EASTER_DEFAULT; - zend_bool year_is_null = 1; + bool year_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!l", &year, &year_is_null, &method) == FAILURE) { diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c index 3282bd9e50..0c4a3d82ed 100644 --- a/ext/com_dotnet/com_com.c +++ b/ext/com_dotnet/com_com.c @@ -279,7 +279,7 @@ PHP_FUNCTION(com_get_active_object) char *module_name; size_t module_name_len; zend_long code_page; - zend_bool code_page_is_null = 1; + bool code_page_is_null = 1; IUnknown *unk = NULL; IDispatch *obj = NULL; HRESULT res; @@ -751,7 +751,7 @@ PHP_FUNCTION(com_print_typeinfo) char *ifacename = NULL; char *typelibname = NULL; size_t ifacelen; - zend_bool wantsink = 0; + bool wantsink = 0; php_com_dotnet_object *obj = NULL; ITypeInfo *typeinfo; @@ -814,7 +814,7 @@ PHP_FUNCTION(com_load_typelib) char *name; size_t namelen; ITypeLib *pTL = NULL; - zend_bool cs = TRUE; + bool cs = TRUE; int codepage = COMG(code_page); if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "s|b", &name, &namelen, &cs)) { diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index fb4af4efec..c0e335a165 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -335,7 +335,7 @@ static zend_function *com_method_get(zend_object **object_ptr, zend_string *name f.arg_info = ecalloc(bindptr.lpfuncdesc->cParams, sizeof(zend_arg_info)); for (i = 0; i < bindptr.lpfuncdesc->cParams; i++) { - zend_bool by_ref = (bindptr.lpfuncdesc->lprgelemdescParam[i].paramdesc.wParamFlags & PARAMFLAG_FOUT) != 0; + bool by_ref = (bindptr.lpfuncdesc->lprgelemdescParam[i].paramdesc.wParamFlags & PARAMFLAG_FOUT) != 0; f.arg_info[i].type = (zend_type) ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(by_ref, 0)); } diff --git a/ext/com_dotnet/com_persist.c b/ext/com_dotnet/com_persist.c index 3bde7175d8..bf0f7062fb 100644 --- a/ext/com_dotnet/com_persist.c +++ b/ext/com_dotnet/com_persist.c @@ -363,7 +363,7 @@ CPH_METHOD(SaveToFile) HRESULT res; char *filename, *fullpath = NULL; size_t filename_len; - zend_bool remember = TRUE; + bool remember = TRUE; OLECHAR *olefilename = NULL; CPH_FETCH(); diff --git a/ext/com_dotnet/php_com_dotnet.h b/ext/com_dotnet/php_com_dotnet.h index 025e1a7dd0..7a554d7268 100644 --- a/ext/com_dotnet/php_com_dotnet.h +++ b/ext/com_dotnet/php_com_dotnet.h @@ -36,13 +36,13 @@ PHP_RSHUTDOWN_FUNCTION(com_dotnet); PHP_MINFO_FUNCTION(com_dotnet); ZEND_BEGIN_MODULE_GLOBALS(com_dotnet) - zend_bool allow_dcom; - zend_bool autoreg_verbose; - zend_bool autoreg_on; - zend_bool autoreg_case_sensitive; + bool allow_dcom; + bool autoreg_verbose; + bool autoreg_on; + bool autoreg_case_sensitive; void *dotnet_runtime_stuff; /* opaque to avoid cluttering up other modules */ int code_page; /* default code_page if left unspecified */ - zend_bool rshutdown_started; + bool rshutdown_started; ZEND_END_MODULE_GLOBALS(com_dotnet) #if defined(ZTS) && defined(COMPILE_DL_COM_DOTNET) diff --git a/ext/curl/curl_private.h b/ext/curl/curl_private.h index 859a064dc8..bc6852198d 100644 --- a/ext/curl/curl_private.h +++ b/ext/curl/curl_private.h @@ -99,7 +99,7 @@ typedef struct { struct _php_curl_free *to_free; struct _php_curl_send_headers header; struct _php_curl_error err; - zend_bool in_callback; + bool in_callback; uint32_t* clone; zval postfields; /* For CURLOPT_PRIVATE */ diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 5b2b974e88..39f7b7e5d0 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -2967,7 +2967,7 @@ PHP_FUNCTION(curl_getinfo) zval *zid; php_curl *ch; zend_long option; - zend_bool option_is_null = 1; + bool option_is_null = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJECT_OF_CLASS(zid, curl_ce) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 8c0f5a62b1..4d739efc33 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -785,7 +785,7 @@ static void php_date(INTERNAL_FUNCTION_PARAMETERS, int localtime) { zend_string *format; zend_long ts; - zend_bool ts_is_null = 1; + bool ts_is_null = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(format) @@ -941,7 +941,7 @@ PHP_FUNCTION(idate) { zend_string *format; zend_long ts; - zend_bool ts_is_null = 1; + bool ts_is_null = 1; int ret; ZEND_PARSE_PARAMETERS_START(1, 2) @@ -1012,7 +1012,7 @@ PHP_FUNCTION(strtotime) int parse_error, epoch_does_not_fit_in_zend_long; timelib_error_container *error; zend_long preset_ts, ts; - zend_bool preset_ts_is_null = 1; + bool preset_ts_is_null = 1; timelib_time *t, *now; timelib_tzinfo *tzi; @@ -1065,7 +1065,7 @@ PHP_FUNCTION(strtotime) PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt) { zend_long hou, min, sec, mon, day, yea; - zend_bool min_is_null = 1, sec_is_null = 1, mon_is_null = 1, day_is_null = 1, yea_is_null = 1; + bool min_is_null = 1, sec_is_null = 1, mon_is_null = 1, day_is_null = 1, yea_is_null = 1; timelib_time *now; timelib_tzinfo *tzi = NULL; zend_long ts, adjust_seconds = 0; @@ -1179,7 +1179,7 @@ PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gmt) { zend_string *format; zend_long timestamp; - zend_bool timestamp_is_null = 1; + bool timestamp_is_null = 1; struct tm ta; int max_reallocs = 5; size_t buf_len = 256, real_len; @@ -1300,8 +1300,8 @@ PHP_FUNCTION(time) PHP_FUNCTION(localtime) { zend_long timestamp; - zend_bool timestamp_is_null = 1; - zend_bool associative = 0; + bool timestamp_is_null = 1; + bool associative = 0; timelib_tzinfo *tzi; timelib_time *ts; @@ -1353,7 +1353,7 @@ PHP_FUNCTION(localtime) PHP_FUNCTION(getdate) { zend_long timestamp; - zend_bool timestamp_is_null = 1; + bool timestamp_is_null = 1; timelib_tzinfo *tzi; timelib_time *ts; @@ -3350,7 +3350,7 @@ PHP_FUNCTION(date_diff) zval *object1, *object2; php_date_obj *dateobj1, *dateobj2; php_interval_obj *interval; - zend_bool absolute = 0; + bool absolute = 0; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO|b", &object1, date_ce_interface, &object2, date_ce_interface, &absolute) == FAILURE) { RETURN_THROWS(); @@ -4462,7 +4462,7 @@ PHP_FUNCTION(date_default_timezone_get) static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_sunset) { double latitude, longitude, zenith, gmt_offset, altitude; - zend_bool latitude_is_null = 1, longitude_is_null = 1, zenith_is_null = 1, gmt_offset_is_null = 1; + bool latitude_is_null = 1, longitude_is_null = 1, zenith_is_null = 1, gmt_offset_is_null = 1; double h_rise, h_set, N; timelib_sll rise, set, transit; zend_long time, retformat = SUNFUNCS_RET_STRING; diff --git a/ext/dba/dba.c b/ext/dba/dba.c index b7bfecc77c..ccf76d395b 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -542,8 +542,8 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) zend_string *opened_path = NULL; char *lock_name; #ifdef PHP_WIN32 - zend_bool restarted = 0; - zend_bool need_creation = 0; + bool restarted = 0; + bool need_creation = 0; #endif if (ac < 2) { @@ -860,7 +860,7 @@ restart: fcntl(info->fd, F_SETFL, flags & ~O_APPEND); #elif defined(PHP_WIN32) } else if (modenr == DBA_CREAT && need_creation && !restarted) { - zend_bool close_both; + bool close_both; close_both = (info->fp != info->lock.fp); php_stream_close(info->lock.fp); @@ -1155,7 +1155,7 @@ PHP_FUNCTION(dba_sync) PHP_FUNCTION(dba_handlers) { dba_handler *hptr; - zend_bool full_info = 0; + bool full_info = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &full_info) == FAILURE) { RETURN_THROWS(); diff --git a/ext/dba/dba_inifile.c b/ext/dba/dba_inifile.c index dd3d42290f..ec50aeba15 100644 --- a/ext/dba/dba_inifile.c +++ b/ext/dba/dba_inifile.c @@ -120,7 +120,7 @@ DBA_EXISTS_FUNC(inifile) DBA_DELETE_FUNC(inifile) { int res; - zend_bool found = 0; + bool found = 0; INIFILE_DATA; INIFILE_GKEY; diff --git a/ext/dba/libinifile/inifile.c b/ext/dba/libinifile/inifile.c index 43227c42d7..72f0ef4d9c 100644 --- a/ext/dba/libinifile/inifile.c +++ b/ext/dba/libinifile/inifile.c @@ -406,7 +406,7 @@ static int inifile_copy_to(inifile *dba, size_t pos_start, size_t pos_end, inifi /* {{{ inifile_filter * copy from to dba while ignoring key name (group must equal) */ -static int inifile_filter(inifile *dba, inifile *from, const key_type *key, zend_bool *found) +static int inifile_filter(inifile *dba, inifile *from, const key_type *key, bool *found) { size_t pos_start = 0, pos_next = 0, pos_curr; int ret = SUCCESS; @@ -418,7 +418,7 @@ static int inifile_filter(inifile *dba, inifile *from, const key_type *key, zend switch(inifile_key_cmp(&ln.key, key)) { case 0: if (found) { - *found = (zend_bool) 1; + *found = (bool) 1; } pos_curr = php_stream_tell(from->fp); if (pos_start != pos_next) { @@ -453,7 +453,7 @@ static int inifile_filter(inifile *dba, inifile *from, const key_type *key, zend /* }}} */ /* {{{ inifile_delete_replace_append */ -static int inifile_delete_replace_append(inifile *dba, const key_type *key, const val_type *value, int append, zend_bool *found) +static int inifile_delete_replace_append(inifile *dba, const key_type *key, const val_type *value, int append, bool *found) { size_t pos_grp_start=0, pos_grp_next; inifile *ini_tmp = NULL; @@ -562,7 +562,7 @@ int inifile_delete(inifile *dba, const key_type *key) /* }}} */ /* {{{ inifile_delete_ex */ -int inifile_delete_ex(inifile *dba, const key_type *key, zend_bool *found) +int inifile_delete_ex(inifile *dba, const key_type *key, bool *found) { return inifile_delete_replace_append(dba, key, NULL, 0, found); } @@ -576,7 +576,7 @@ int inifile_replace(inifile *dba, const key_type *key, const val_type *value) /* }}} */ /* {{{ inifile_replace_ex */ -int inifile_replace_ex(inifile *dba, const key_type *key, const val_type *value, zend_bool *found) +int inifile_replace_ex(inifile *dba, const key_type *key, const val_type *value, bool *found) { return inifile_delete_replace_append(dba, key, value, 0, found); } diff --git a/ext/dba/libinifile/inifile.h b/ext/dba/libinifile/inifile.h index ec33f80ee7..d1816b1d2e 100644 --- a/ext/dba/libinifile/inifile.h +++ b/ext/dba/libinifile/inifile.h @@ -45,9 +45,9 @@ val_type inifile_fetch(inifile *dba, const key_type *key, int skip); int inifile_firstkey(inifile *dba); int inifile_nextkey(inifile *dba); int inifile_delete(inifile *dba, const key_type *key); -int inifile_delete_ex(inifile *dba, const key_type *key, zend_bool *found); +int inifile_delete_ex(inifile *dba, const key_type *key, bool *found); int inifile_replace(inifile *dba, const key_type *key, const val_type *val); -int inifile_replace_ex(inifile *dba, const key_type *key, const val_type *val, zend_bool *found); +int inifile_replace_ex(inifile *dba, const key_type *key, const val_type *val, bool *found); int inifile_append(inifile *dba, const key_type *key, const val_type *val); char *inifile_version(); diff --git a/ext/dom/document.c b/ext/dom/document.c index c6d0f723f8..0689057cde 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -795,7 +795,7 @@ PHP_METHOD(DOMDocument, importNode) xmlNodePtr nodep, retnodep; dom_object *intern, *nodeobj; int ret; - zend_bool recursive = 0; + bool recursive = 0; /* See http://www.xmlsoft.org/html/libxml-tree.html#xmlDocCopyNode for meaning of values */ int extended_recursive; diff --git a/ext/dom/dom_iterators.c b/ext/dom/dom_iterators.c index f56d249034..c3fbb356e4 100644 --- a/ext/dom/dom_iterators.c +++ b/ext/dom/dom_iterators.c @@ -182,7 +182,7 @@ static void php_dom_iterator_move_forward(zend_object_iterator *iter) /* {{{ */ int previndex=0; HashTable *nodeht; zval *entry; - zend_bool do_curobj_undef = 1; + bool do_curobj_undef = 1; php_dom_iterator *iterator = (php_dom_iterator *)iter; diff --git a/ext/dom/element.c b/ext/dom/element.c index 317619001b..ba67f83d69 100644 --- a/ext/dom/element.c +++ b/ext/dom/element.c @@ -1014,7 +1014,7 @@ PHP_METHOD(DOMElement, hasAttributeNS) } /* }}} end dom_element_has_attribute_ns */ -static void php_set_attribute_id(xmlAttrPtr attrp, zend_bool is_id) /* {{{ */ +static void php_set_attribute_id(xmlAttrPtr attrp, bool is_id) /* {{{ */ { if (is_id == 1 && attrp->atype != XML_ATTRIBUTE_ID) { xmlChar *id_val; @@ -1044,7 +1044,7 @@ PHP_METHOD(DOMElement, setIdAttribute) dom_object *intern; char *name; size_t name_len; - zend_bool is_id; + bool is_id; id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sb", &name, &name_len, &is_id) == FAILURE) { @@ -1080,7 +1080,7 @@ PHP_METHOD(DOMElement, setIdAttributeNS) dom_object *intern; size_t uri_len, name_len; char *uri, *name; - zend_bool is_id; + bool is_id; id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssb", &uri, &uri_len, &name, &name_len, &is_id) == FAILURE) { @@ -1114,7 +1114,7 @@ PHP_METHOD(DOMElement, setIdAttributeNode) xmlNode *nodep; xmlAttrPtr attrp; dom_object *intern, *attrobj; - zend_bool is_id; + bool is_id; id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &node, dom_attr_class_entry, &is_id) == FAILURE) { diff --git a/ext/dom/node.c b/ext/dom/node.c index a6f88b5c0f..34dc5c76d2 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -1271,7 +1271,7 @@ PHP_METHOD(DOMNode, cloneNode) xmlNode *n, *node; int ret; dom_object *intern; - zend_bool recursive = 0; + bool recursive = 0; id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &recursive) == FAILURE) { @@ -1543,7 +1543,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ xmlDocPtr docp; xmlNodeSetPtr nodeset = NULL; dom_object *intern; - zend_bool exclusive=0, with_comments=0; + bool exclusive=0, with_comments=0; xmlChar **inclusive_ns_prefixes = NULL; char *file = NULL; int ret = -1; diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 78d22f6a5e..e8d75d5999 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -1125,7 +1125,7 @@ void php_dom_create_iterator(zval *return_value, int ce_type) /* {{{ */ /* }}} */ /* {{{ php_dom_create_object */ -PHP_DOM_EXPORT zend_bool php_dom_create_object(xmlNodePtr obj, zval *return_value, dom_object *domobj) +PHP_DOM_EXPORT bool php_dom_create_object(xmlNodePtr obj, zval *return_value, dom_object *domobj) { zend_class_entry *ce; dom_object *intern; @@ -1301,10 +1301,10 @@ xmlNode *dom_get_elements_by_tag_name_ns_raw(xmlNodePtr nodep, char *ns, char *l /* }}} */ /* }}} end dom_element_get_elements_by_tag_name_ns_raw */ -static inline zend_bool is_empty_node(xmlNodePtr nodep) +static inline bool is_empty_node(xmlNodePtr nodep) { xmlChar *strContent = xmlNodeGetContent(nodep); - zend_bool ret = strContent == NULL || *strContent == '\0'; + bool ret = strContent == NULL || *strContent == '\0'; xmlFree(strContent); return ret; } diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h index 40548c2d1a..671710e2e8 100644 --- a/ext/dom/xml_common.h +++ b/ext/dom/xml_common.h @@ -53,7 +53,7 @@ static inline dom_object *php_dom_obj_from_obj(zend_object *obj) { PHP_DOM_EXPORT extern zend_class_entry *dom_node_class_entry; PHP_DOM_EXPORT dom_object *php_dom_object_get_data(xmlNodePtr obj); -PHP_DOM_EXPORT zend_bool php_dom_create_object(xmlNodePtr obj, zval* return_value, dom_object *domobj); +PHP_DOM_EXPORT bool php_dom_create_object(xmlNodePtr obj, zval* return_value, dom_object *domobj); PHP_DOM_EXPORT xmlNodePtr dom_object_get_node(dom_object *obj); #define DOM_XMLNS_NAMESPACE \ diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index 1f97601c42..6ea3533188 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -208,7 +208,7 @@ static void dom_xpath_ext_function_object_php(xmlXPathParserContextPtr ctxt, int PHP_METHOD(DOMXPath, __construct) { zval *doc; - zend_bool register_node_ns = 1; + bool register_node_ns = 1; xmlDocPtr docp = NULL; dom_object *docobj; dom_xpath_object *intern; @@ -335,7 +335,7 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ char *expr; xmlDoc *docp = NULL; xmlNsPtr *ns = NULL; - zend_bool register_node_ns; + bool register_node_ns; id = ZEND_THIS; intern = Z_XPATHOBJ_P(id); diff --git a/ext/exif/exif.c b/ext/exif/exif.c index db67531566..e54d508b0e 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -2036,7 +2036,7 @@ typedef struct { char *valid_end; /* exclusive */ } exif_offset_info; -static zend_always_inline zend_bool ptr_offset_overflows(char *ptr, size_t offset) { +static zend_always_inline bool ptr_offset_overflows(char *ptr, size_t offset) { return UINTPTR_MAX - (uintptr_t) ptr < offset; } @@ -2072,7 +2072,7 @@ static inline char *exif_offset_info_try_get( return start; } -static inline zend_bool exif_offset_info_contains( +static inline bool exif_offset_info_contains( const exif_offset_info *info, char *start, size_t length) { char *end; if (ptr_offset_overflows(start, length)) { @@ -4478,7 +4478,7 @@ static bool exif_read_from_file(image_info_type *ImageInfo, char *FileName, int PHP_FUNCTION(exif_read_data) { zend_string *z_sections_needed = NULL; - zend_bool sub_arrays = 0, read_thumbnail = 0, read_all = 0; + bool sub_arrays = 0, read_thumbnail = 0, read_all = 0; zval *stream; bool ret; int i, sections_needed = 0; diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index 1e6eaa3119..e18da8bf7a 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -124,8 +124,8 @@ struct _zend_ffi_type { typedef struct _zend_ffi_field { size_t offset; - zend_bool is_const; - zend_bool is_nested; /* part of nested anonymous struct */ + bool is_const; + bool is_nested; /* part of nested anonymous struct */ uint8_t first_bit; uint8_t bits; zend_ffi_type *type; @@ -140,7 +140,7 @@ typedef enum _zend_ffi_symbol_kind { typedef struct _zend_ffi_symbol { zend_ffi_symbol_kind kind; - zend_bool is_const; + bool is_const; zend_ffi_type *type; union { void *addr; @@ -158,7 +158,7 @@ typedef struct _zend_ffi { DL_HANDLE lib; HashTable *symbols; HashTable *tags; - zend_bool persistent; + bool persistent; } zend_ffi; #define ZEND_FFI_TYPE_OWNED (1<<0) @@ -209,7 +209,7 @@ static void _zend_ffi_type_dtor(zend_ffi_type *type); static void zend_ffi_finalize_type(zend_ffi_dcl *dcl); static int zend_ffi_is_same_type(zend_ffi_type *type1, zend_ffi_type *type2); static zend_ffi_type *zend_ffi_remember_type(zend_ffi_type *type); -static char *zend_ffi_parse_directives(const char *filename, char *code_pos, char **scope_name, char **lib, zend_bool preload); +static char *zend_ffi_parse_directives(const char *filename, char *code_pos, char **scope_name, char **lib, bool preload); static ZEND_FUNCTION(ffi_trampoline); static ZEND_COLD void zend_ffi_return_unsupported(zend_ffi_type *type); static ZEND_COLD void zend_ffi_pass_unsupported(zend_ffi_type *type); @@ -458,7 +458,7 @@ static zend_never_inline zend_ffi_cdata *zend_ffi_cdata_to_zval_slow_ret(void *p } /* }}} */ -static zend_always_inline void zend_ffi_cdata_to_zval(zend_ffi_cdata *cdata, void *ptr, zend_ffi_type *type, int read_type, zval *rv, zend_ffi_flags flags, zend_bool is_ret, zend_bool debug_union) /* {{{ */ +static zend_always_inline void zend_ffi_cdata_to_zval(zend_ffi_cdata *cdata, void *ptr, zend_ffi_type *type, int read_type, zval *rv, zend_ffi_flags flags, bool is_ret, bool debug_union) /* {{{ */ { if (read_type == BP_VAR_R) { zend_ffi_type_kind kind = type->kind; @@ -1802,7 +1802,7 @@ typedef struct _zend_ffi_cdata_iterator { zend_object_iterator it; zend_long key; zval value; - zend_bool by_ref; + bool by_ref; } zend_ffi_cdata_iterator; static void zend_ffi_cdata_it_dtor(zend_object_iterator *iter) /* {{{ */ @@ -2007,7 +2007,7 @@ static HashTable *zend_ffi_cdata_get_debug_info(zend_object *obj, int *is_temp) } /* }}} */ -static int zend_ffi_cdata_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, zend_bool check_only) /* {{{ */ +static int zend_ffi_cdata_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, bool check_only) /* {{{ */ { zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); @@ -3103,7 +3103,7 @@ static zend_ffi_type *zend_ffi_remember_type(zend_ffi_type *type) /* {{{ */ } /* }}} */ -static zend_ffi *zend_ffi_load(const char *filename, zend_bool preload) /* {{{ */ +static zend_ffi *zend_ffi_load(const char *filename, bool preload) /* {{{ */ { struct stat buf; int fd; @@ -3460,7 +3460,7 @@ static int zend_ffi_validate_vla(zend_ffi_type *type) /* {{{ */ } /* }}} */ -static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, zend_bool allow_incomplete_tag, zend_bool allow_incomplete_array) /* {{{ */ +static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, bool allow_incomplete_tag, bool allow_incomplete_array) /* {{{ */ { if (!allow_incomplete_tag && (type->attr & ZEND_FFI_ATTR_INCOMPLETE_TAG)) { if (FFI_G(tags)) { @@ -3504,7 +3504,7 @@ static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, zend_bool allo } /* }}} */ -static int zend_ffi_validate_type(zend_ffi_type *type, zend_bool allow_incomplete_tag, zend_bool allow_incomplete_array) /* {{{ */ +static int zend_ffi_validate_type(zend_ffi_type *type, bool allow_incomplete_tag, bool allow_incomplete_array) /* {{{ */ { if (type->kind == ZEND_FFI_TYPE_VOID) { zend_ffi_throw_parser_error("void type is not allowed at line %d", FFI_G(line)); @@ -3514,7 +3514,7 @@ static int zend_ffi_validate_type(zend_ffi_type *type, zend_bool allow_incomplet } /* }}} */ -static int zend_ffi_validate_var_type(zend_ffi_type *type, zend_bool allow_incomplete_array) /* {{{ */ +static int zend_ffi_validate_var_type(zend_ffi_type *type, bool allow_incomplete_array) /* {{{ */ { if (type->kind == ZEND_FFI_TYPE_FUNC) { zend_ffi_throw_parser_error("function type is not allowed at line %d", FFI_G(line)); @@ -3598,9 +3598,9 @@ ZEND_METHOD(FFI, new) /* {{{ */ zend_ffi_type *type, *type_ptr; zend_ffi_cdata *cdata; void *ptr; - zend_bool owned = 1; - zend_bool persistent = 0; - zend_bool is_const = 0; + bool owned = 1; + bool persistent = 0; + bool is_const = 0; zend_ffi_flags flags = ZEND_FFI_FLAG_OWNED; ZEND_FFI_VALIDATE_API_RESTRICTION(); @@ -3750,7 +3750,7 @@ ZEND_METHOD(FFI, cast) /* {{{ */ zend_object *ztype = NULL; zend_ffi_type *old_type, *type, *type_ptr; zend_ffi_cdata *old_cdata, *cdata; - zend_bool is_const = 0; + bool is_const = 0; zval *zv, *arg; void *ptr; @@ -4366,7 +4366,7 @@ ZEND_METHOD(FFI, string) /* {{{ */ zend_ffi_type *type; void *ptr; zend_long size; - zend_bool size_is_null = 1; + bool size_is_null = 1; ZEND_FFI_VALIDATE_API_RESTRICTION(); ZEND_PARSE_PARAMETERS_START(1, 2) @@ -4451,7 +4451,7 @@ ZEND_METHOD(FFI_CType, getName) /* {{{ */ } } -static char *zend_ffi_parse_directives(const char *filename, char *code_pos, char **scope_name, char **lib, zend_bool preload) /* {{{ */ +static char *zend_ffi_parse_directives(const char *filename, char *code_pos, char **scope_name, char **lib, bool preload) /* {{{ */ { char *p; @@ -4815,7 +4815,7 @@ static int zend_ffi_preload(char *preload) /* {{{ */ { zend_ffi *ffi; char *s = NULL, *e, *filename; - zend_bool is_glob = 0; + bool is_glob = 0; e = preload; while (*e) { @@ -5419,8 +5419,8 @@ void zend_ffi_add_enum_val(zend_ffi_dcl *enum_dcl, const char *name, size_t name const zend_ffi_type *sym_type; int64_t value; zend_ffi_type *enum_type = ZEND_FFI_TYPE(enum_dcl->type); - zend_bool overflow = 0; - zend_bool is_signed = + bool overflow = 0; + bool is_signed = (enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT8 || enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT16 || enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT32 || @@ -5605,7 +5605,7 @@ void zend_ffi_add_field(zend_ffi_dcl *struct_dcl, const char *name, size_t name_ struct_type->size += field_type->size; } field->type = field_dcl->type; - field->is_const = (zend_bool)(field_dcl->attr & ZEND_FFI_ATTR_CONST); + field->is_const = (bool)(field_dcl->attr & ZEND_FFI_ATTR_CONST); field->is_nested = 0; field->first_bit = 0; field->bits = 0; @@ -5773,7 +5773,7 @@ void zend_ffi_add_bit_field(zend_ffi_dcl *struct_dcl, const char *name, size_t n } } field->type = field_dcl->type; - field->is_const = (zend_bool)(field_dcl->attr & ZEND_FFI_ATTR_CONST); + field->is_const = (bool)(field_dcl->attr & ZEND_FFI_ATTR_CONST); field->is_nested = 0; field_dcl->type = field_type; /* reset "owned" flag */ @@ -6092,7 +6092,7 @@ void zend_ffi_declare(const char *name, size_t name_len, zend_ffi_dcl *dcl) /* { if ((dcl->flags & ZEND_FFI_DCL_STORAGE_CLASS) == ZEND_FFI_DCL_TYPEDEF && sym->kind == ZEND_FFI_SYM_TYPE && zend_ffi_is_same_type(ZEND_FFI_TYPE(sym->type), ZEND_FFI_TYPE(dcl->type)) - && sym->is_const == (zend_bool)(dcl->attr & ZEND_FFI_ATTR_CONST)) { + && sym->is_const == (bool)(dcl->attr & ZEND_FFI_ATTR_CONST)) { /* allowed redeclaration */ zend_ffi_type_dtor(dcl->type); return; @@ -6110,7 +6110,7 @@ void zend_ffi_declare(const char *name, size_t name_len, zend_ffi_dcl *dcl) /* { } else { if (sym->kind == ZEND_FFI_SYM_VAR && zend_ffi_is_same_type(ZEND_FFI_TYPE(sym->type), type) - && sym->is_const == (zend_bool)(dcl->attr & ZEND_FFI_ATTR_CONST)) { + && sym->is_const == (bool)(dcl->attr & ZEND_FFI_ATTR_CONST)) { /* allowed redeclaration */ zend_ffi_type_dtor(dcl->type); return; @@ -6139,7 +6139,7 @@ void zend_ffi_declare(const char *name, size_t name_len, zend_ffi_dcl *dcl) /* { sym = pemalloc(sizeof(zend_ffi_symbol), FFI_G(persistent)); sym->kind = ZEND_FFI_SYM_TYPE; sym->type = dcl->type; - sym->is_const = (zend_bool)(dcl->attr & ZEND_FFI_ATTR_CONST); + sym->is_const = (bool)(dcl->attr & ZEND_FFI_ATTR_CONST); dcl->type = ZEND_FFI_TYPE(dcl->type); /* reset "owned" flag */ zend_hash_str_add_new_ptr(FFI_G(symbols), name, name_len, sym); } else { @@ -6155,7 +6155,7 @@ void zend_ffi_declare(const char *name, size_t name_len, zend_ffi_dcl *dcl) /* { sym = pemalloc(sizeof(zend_ffi_symbol), FFI_G(persistent)); sym->kind = (type->kind == ZEND_FFI_TYPE_FUNC) ? ZEND_FFI_SYM_FUNC : ZEND_FFI_SYM_VAR; sym->type = dcl->type; - sym->is_const = (zend_bool)(dcl->attr & ZEND_FFI_ATTR_CONST); + sym->is_const = (bool)(dcl->attr & ZEND_FFI_ATTR_CONST); dcl->type = type; /* reset "owned" flag */ zend_hash_str_add_new_ptr(FFI_G(symbols), name, name_len, sym); } else { @@ -6167,7 +6167,7 @@ void zend_ffi_declare(const char *name, size_t name_len, zend_ffi_dcl *dcl) /* { } /* }}} */ -void zend_ffi_declare_tag(const char *name, size_t name_len, zend_ffi_dcl *dcl, zend_bool incomplete) /* {{{ */ +void zend_ffi_declare_tag(const char *name, size_t name_len, zend_ffi_dcl *dcl, bool incomplete) /* {{{ */ { zend_ffi_tag *tag; zend_ffi_type *type; diff --git a/ext/ffi/ffi.g b/ext/ffi/ffi.g index 4d7c003906..0dd94dfb6d 100644 --- a/ext/ffi/ffi.g +++ b/ext/ffi/ffi.g @@ -335,7 +335,7 @@ enumerator(zend_ffi_dcl *enum_dcl, int64_t *min, int64_t *max, int64_t *last): declarator(zend_ffi_dcl *dcl, const char **name, size_t *name_len): {zend_ffi_dcl nested_dcl = {ZEND_FFI_DCL_CHAR, 0, 0, 0, NULL};} - {zend_bool nested = 0;} + {bool nested = 0;} pointer(dcl)? ( ID(name, name_len) | "(" @@ -350,7 +350,7 @@ declarator(zend_ffi_dcl *dcl, const char **name, size_t *name_len): abstract_declarator(zend_ffi_dcl *dcl): {zend_ffi_dcl nested_dcl = {ZEND_FFI_DCL_CHAR, 0, 0, 0, NULL};} - {zend_bool nested = 0;} + {bool nested = 0;} pointer(dcl)? ( &nested_declarator_start "(" @@ -365,7 +365,7 @@ abstract_declarator(zend_ffi_dcl *dcl): parameter_declarator(zend_ffi_dcl *dcl, const char **name, size_t *name_len): {zend_ffi_dcl nested_dcl = {ZEND_FFI_DCL_CHAR, 0, 0, 0, NULL};} - {zend_bool nested = 0;} + {bool nested = 0;} pointer(dcl)? ( &nested_declarator_start "(" @@ -440,7 +440,7 @@ array_or_function_declarators(zend_ffi_dcl *dcl, zend_ffi_dcl *nested_dcl): parameter_declaration(HashTable **args): {const char *name = NULL;} {size_t name_len = 0;} - {zend_bool old_allow_vla = FFI_G(allow_vla);} + {bool old_allow_vla = FFI_G(allow_vla);} {FFI_G(allow_vla) = 1;} {zend_ffi_dcl param_dcl = ZEND_FFI_ATTR_INIT;} specifier_qualifier_list(¶m_dcl) @@ -498,7 +498,7 @@ attrib(zend_ffi_dcl *dcl): {size_t name_len;} {int n;} {zend_ffi_val val;} - {zend_bool orig_attribute_parsing;} + {bool orig_attribute_parsing;} ( ID(&name, &name_len) ( /* empty */ {zend_ffi_add_attribute(dcl, name, name_len);} diff --git a/ext/ffi/ffi_parser.c b/ext/ffi/ffi_parser.c index 03d05eb6d9..d50c6f4abf 100644 --- a/ext/ffi/ffi_parser.c +++ b/ext/ffi/ffi_parser.c @@ -2569,7 +2569,7 @@ static int parse_enumerator(int sym, zend_ffi_dcl *enum_dcl, int64_t *min, int64 static int parse_declarator(int sym, zend_ffi_dcl *dcl, const char **name, size_t *name_len) { zend_ffi_dcl nested_dcl = {ZEND_FFI_DCL_CHAR, 0, 0, 0, NULL}; - zend_bool nested = 0; + bool nested = 0; if (sym == YY__STAR) { sym = parse_pointer(sym, dcl); } @@ -2598,7 +2598,7 @@ static int parse_declarator(int sym, zend_ffi_dcl *dcl, const char **name, size_ static int parse_abstract_declarator(int sym, zend_ffi_dcl *dcl) { zend_ffi_dcl nested_dcl = {ZEND_FFI_DCL_CHAR, 0, 0, 0, NULL}; - zend_bool nested = 0; + bool nested = 0; if (sym == YY__STAR) { sym = parse_pointer(sym, dcl); } @@ -2623,7 +2623,7 @@ static int parse_abstract_declarator(int sym, zend_ffi_dcl *dcl) { static int parse_parameter_declarator(int sym, zend_ffi_dcl *dcl, const char **name, size_t *name_len) { zend_ffi_dcl nested_dcl = {ZEND_FFI_DCL_CHAR, 0, 0, 0, NULL}; - zend_bool nested = 0; + bool nested = 0; if (sym == YY__STAR) { sym = parse_pointer(sym, dcl); } @@ -2863,7 +2863,7 @@ _yy_state_119: static int parse_parameter_declaration(int sym, HashTable **args) { const char *name = NULL; size_t name_len = 0; - zend_bool old_allow_vla = FFI_G(allow_vla); + bool old_allow_vla = FFI_G(allow_vla); FFI_G(allow_vla) = 1; zend_ffi_dcl param_dcl = ZEND_FFI_ATTR_INIT; sym = parse_specifier_qualifier_list(sym, ¶m_dcl); @@ -2965,7 +2965,7 @@ static int parse_attrib(int sym, zend_ffi_dcl *dcl) { size_t name_len; int n; zend_ffi_val val; - zend_bool orig_attribute_parsing; + bool orig_attribute_parsing; if (sym == YY_ID || sym == YY_CONST || sym == YY___CONST || sym == YY___CONST__) { if (sym == YY_ID) { sym = parse_ID(sym, &name, &name_len); diff --git a/ext/ffi/php_ffi.h b/ext/ffi/php_ffi.h index 3a10b45478..4b395dc83d 100644 --- a/ext/ffi/php_ffi.h +++ b/ext/ffi/php_ffi.h @@ -30,7 +30,7 @@ typedef struct _zend_ffi_type zend_ffi_type; ZEND_BEGIN_MODULE_GLOBALS(ffi) zend_ffi_api_restriction restriction; - zend_bool is_cli; + bool is_cli; /* predefined ffi_types */ HashTable types; @@ -54,9 +54,9 @@ ZEND_BEGIN_MODULE_GLOBALS(ffi) int line; HashTable *symbols; HashTable *tags; - zend_bool allow_vla; - zend_bool attribute_parsing; - zend_bool persistent; + bool allow_vla; + bool attribute_parsing; + bool persistent; uint32_t default_type_attr; ZEND_END_MODULE_GLOBALS(ffi) @@ -214,7 +214,7 @@ void ZEND_NORETURN zend_ffi_parser_error(const char *msg, ...); int zend_ffi_is_typedef_name(const char *name, size_t name_len); void zend_ffi_resolve_typedef(const char *name, size_t name_len, zend_ffi_dcl *dcl); void zend_ffi_resolve_const(const char *name, size_t name_len, zend_ffi_val *val); -void zend_ffi_declare_tag(const char *name, size_t name_len, zend_ffi_dcl *dcl, zend_bool incomplete); +void zend_ffi_declare_tag(const char *name, size_t name_len, zend_ffi_dcl *dcl, bool incomplete); void zend_ffi_make_enum_type(zend_ffi_dcl *dcl); void zend_ffi_add_enum_val(zend_ffi_dcl *enum_dcl, const char *name, size_t name_len, zend_ffi_val *val, int64_t *min, int64_t *max, int64_t *last); void zend_ffi_make_struct_type(zend_ffi_dcl *dcl); diff --git a/ext/filter/filter.c b/ext/filter/filter.c index 4aa9368213..43c6938aea 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -308,7 +308,7 @@ static unsigned int php_sapi_filter_init(void) return SUCCESS; } -static void php_zval_filter(zval *value, zend_long filter, zend_long flags, zval *options, char* charset, zend_bool copy) /* {{{ */ +static void php_zval_filter(zval *value, zend_long filter, zend_long flags, zval *options, char* charset, bool copy) /* {{{ */ { filter_list_entry filter_func; @@ -433,7 +433,7 @@ static unsigned int php_sapi_filter(int arg, const char *var, char **val, size_t } /* }}} */ -static void php_zval_filter_recursive(zval *value, zend_long filter, zend_long flags, zval *options, char *charset, zend_bool copy) /* {{{ */ +static void php_zval_filter_recursive(zval *value, zend_long filter, zend_long flags, zval *options, char *charset, bool copy) /* {{{ */ { if (Z_TYPE_P(value) == IS_ARRAY) { zval *element; @@ -602,7 +602,7 @@ static void php_filter_call( /* }}} */ static void php_filter_array_handler(zval *input, HashTable *op_ht, zend_long op_long, - zval *return_value, zend_bool add_empty + zval *return_value, bool add_empty ) /* {{{ */ { zend_string *arg_key; zval *tmp, *arg_elm; @@ -737,7 +737,7 @@ PHP_FUNCTION(filter_input_array) { zend_long fetch_from; zval *array_input = NULL; - zend_bool add_empty = 1; + bool add_empty = 1; HashTable *op_ht = NULL; zend_long op_long = FILTER_DEFAULT; @@ -787,7 +787,7 @@ PHP_FUNCTION(filter_input_array) PHP_FUNCTION(filter_var_array) { zval *array_input = NULL; - zend_bool add_empty = 1; + bool add_empty = 1; HashTable *op_ht = NULL; zend_long op_long = FILTER_DEFAULT; diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 7ce3386c57..a10ef3a72a 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -232,7 +232,7 @@ ftp_login(ftpbuf_t *ftp, const char *user, const size_t user_len, const char *pa SSL_CTX *ctx = NULL; long ssl_ctx_options = SSL_OP_ALL; int err, res; - zend_bool retry; + bool retry; #endif if (ftp == NULL) { return 0; @@ -1361,7 +1361,7 @@ ftp_getresp(ftpbuf_t *ftp) int single_send(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t size) { #ifdef HAVE_FTP_SSL int err; - zend_bool retry = 0; + bool retry = 0; SSL *handle = NULL; php_socket_t fd; size_t sent; @@ -1460,7 +1460,7 @@ my_recv(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len) int n, nr_bytes; #ifdef HAVE_FTP_SSL int err; - zend_bool retry = 0; + bool retry = 0; SSL *handle = NULL; php_socket_t fd; #endif @@ -1745,7 +1745,7 @@ data_accept(databuf_t *data, ftpbuf_t *ftp) SSL_CTX *ctx; SSL_SESSION *session; int err, res; - zend_bool retry; + bool retry; #endif if (data->fd != -1) { diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index 88a3cd02e7..2b944f04e6 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -495,7 +495,7 @@ PHP_FUNCTION(ftp_rawlist) ftpbuf_t *ftp; char **llist, **ptr, *dir; size_t dir_len; - zend_bool recursive = 0; + bool recursive = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|b", &z_ftp, php_ftp_ce, &dir, &dir_len, &recursive) == FAILURE) { RETURN_THROWS(); @@ -662,7 +662,7 @@ PHP_FUNCTION(ftp_pasv) { zval *z_ftp; ftpbuf_t *ftp; - zend_bool pasv; + bool pasv; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &z_ftp, php_ftp_ce, &pasv) == FAILURE) { RETURN_THROWS(); diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 4f5f41099f..aecca33c8b 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -848,7 +848,7 @@ PHP_FUNCTION(imageistruecolor) PHP_FUNCTION(imagetruecolortopalette) { zval *IM; - zend_bool dither; + bool dither; zend_long ncolors; gdImagePtr im; @@ -1001,7 +1001,7 @@ PHP_FUNCTION(imagefilledarc) PHP_FUNCTION(imagealphablending) { zval *IM; - zend_bool blend; + bool blend; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &IM, gd_image_ce, &blend) == FAILURE) { @@ -1020,7 +1020,7 @@ PHP_FUNCTION(imagealphablending) PHP_FUNCTION(imagesavealpha) { zval *IM; - zend_bool save; + bool save; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &IM, gd_image_ce, &save) == FAILURE) { @@ -1188,7 +1188,7 @@ PHP_FUNCTION(imagecopyresampled) PHP_FUNCTION(imagegrabwindow) { HWND window; - zend_bool client_area = 0; + bool client_area = 0; RECT rc = {0}; int Width, Height; HDC hdc; @@ -1317,7 +1317,7 @@ PHP_FUNCTION(imagerotate) gdImagePtr im_dst, im_src; double degrees; zend_long color; - zend_bool ignoretransparent = 0; + bool ignoretransparent = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Odl|b", &SIM, gd_image_ce, °rees, &color, &ignoretransparent) == FAILURE) { RETURN_THROWS(); @@ -1919,7 +1919,7 @@ PHP_FUNCTION(imagexbm) char *file = NULL; size_t file_len = 0; zend_long foreground_color; - zend_bool foreground_color_is_null = 1; + bool foreground_color_is_null = 1; gdImagePtr im; int i; gdIOCtx *ctx = NULL; @@ -2057,7 +2057,7 @@ PHP_FUNCTION(imagegd2) PHP_FUNCTION(imagebmp) { zval *imgind; - zend_bool compressed = 1; + bool compressed = 1; gdImagePtr im; gdIOCtx *ctx = NULL; zval *to_zval = NULL; @@ -2607,7 +2607,7 @@ PHP_FUNCTION(imagecolortransparent) { zval *IM; zend_long COL = 0; - zend_bool COL_IS_NULL = 1; + bool COL_IS_NULL = 1; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|l!", &IM, gd_image_ce, &COL, &COL_IS_NULL) == FAILURE) { @@ -2628,8 +2628,8 @@ PHP_FUNCTION(imagecolortransparent) PHP_FUNCTION(imageinterlace) { zval *IM; - zend_bool INT = 0; - zend_bool INT_IS_NULL = 1; + bool INT = 0; + bool INT_IS_NULL = 1; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|b!", &IM, gd_image_ce, &INT, &INT_IS_NULL) == FAILURE) { @@ -2655,7 +2655,7 @@ static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled) { zval *IM, *POINTS; zend_long NPOINTS, COL; - zend_bool COL_IS_NULL = 1; + bool COL_IS_NULL = 1; zval *var = NULL; gdImagePtr im; gdPointPtr points; @@ -3390,7 +3390,7 @@ static void php_image_filter_pixelate(INTERNAL_FUNCTION_PARAMETERS) zval *IM; gdImagePtr im; zend_long tmp, blocksize; - zend_bool mode = 0; + bool mode = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oll|b", &IM, gd_image_ce, &tmp, &blocksize, &mode) == FAILURE) { RETURN_THROWS(); @@ -3568,7 +3568,7 @@ PHP_FUNCTION(imageflip) PHP_FUNCTION(imageantialias) { zval *IM; - zend_bool alias; + bool alias; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &IM, gd_image_ce, &alias) == FAILURE) { @@ -4019,7 +4019,7 @@ PHP_FUNCTION(imageresolution) zval *IM; gdImagePtr im; zend_long res_x, res_y; - zend_bool res_x_is_null = 1, res_y_is_null = 1; + bool res_x_is_null = 1, res_y_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|l!l!", &IM, gd_image_ce, &res_x, &res_x_is_null, &res_y, &res_y_is_null) == FAILURE) { RETURN_THROWS(); diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index da1ab3047f..55567f5c6d 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -72,7 +72,7 @@ PHP_GMP_API zend_class_entry *php_gmp_class_entry(void) { typedef struct _gmp_temp { mpz_t num; - zend_bool is_used; + bool is_used; } gmp_temp_t; #define GMP_ROUND_ZERO 0 @@ -598,7 +598,7 @@ static zend_result convert_to_gmp(mpz_t gmpnumber, zval *val, zend_long base, ui return SUCCESS; case IS_STRING: { char *numstr = Z_STRVAL_P(val); - zend_bool skip_lead = 0; + bool skip_lead = 0; int ret; if (Z_STRLEN_P(val) >= 2 && numstr[0] == '0') { @@ -677,7 +677,7 @@ static void gmp_cmp(zval *return_value, zval *a_arg, zval *b_arg) /* {{{ */ { mpz_ptr gmpnum_a, gmpnum_b; gmp_temp_t temp_a, temp_b; - zend_bool use_si = 0; + bool use_si = 0; zend_long res; FETCH_GMP_ZVAL(gmpnum_a, a_arg, temp_a, 1); @@ -1627,7 +1627,7 @@ ZEND_FUNCTION(gmp_kronecker) zval *a_arg, *b_arg; mpz_ptr gmpnum_a, gmpnum_b; gmp_temp_t temp_a, temp_b; - zend_bool use_a_si = 0, use_b_si = 0; + bool use_a_si = 0, use_b_si = 0; int result; if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &a_arg, &b_arg) == FAILURE){ @@ -1864,7 +1864,7 @@ ZEND_FUNCTION(gmp_setbit) { zval *a_arg; zend_long index; - zend_bool set = 1; + bool set = 1; mpz_ptr gmpnum_a; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol|b", &a_arg, gmp_ce, &index, &set) == FAILURE) { diff --git a/ext/gmp/php_gmp.h b/ext/gmp/php_gmp.h index 9db9d696de..82872ef9d2 100644 --- a/ext/gmp/php_gmp.h +++ b/ext/gmp/php_gmp.h @@ -30,7 +30,7 @@ ZEND_MODULE_DEACTIVATE_D(gmp); ZEND_MODULE_INFO_D(gmp); ZEND_BEGIN_MODULE_GLOBALS(gmp) - zend_bool rand_initialized; + bool rand_initialized; gmp_randstate_t rand_state; ZEND_END_MODULE_GLOBALS(gmp) diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 2a68b8387d..216f80687e 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -353,7 +353,7 @@ PHP_HASH_API int php_hash_unserialize(php_hashcontext_object *hash, zend_long ma /* Userspace */ static void php_hash_do_hash( - zval *return_value, zend_string *algo, char *data, size_t data_len, zend_bool raw_output, bool isfilename, HashTable *args + zval *return_value, zend_string *algo, char *data, size_t data_len, bool raw_output, bool isfilename, HashTable *args ) /* {{{ */ { zend_string *digest; const php_hash_ops *ops; @@ -421,7 +421,7 @@ PHP_FUNCTION(hash) zend_string *algo; char *data; size_t data_len; - zend_bool raw_output = 0; + bool raw_output = 0; HashTable *args = NULL; ZEND_PARSE_PARAMETERS_START(2, 4) @@ -443,7 +443,7 @@ PHP_FUNCTION(hash_file) zend_string *algo; char *data; size_t data_len; - zend_bool raw_output = 0; + bool raw_output = 0; HashTable *args = NULL; ZEND_PARSE_PARAMETERS_START(2, 3) @@ -494,7 +494,7 @@ static inline void php_hash_hmac_round(unsigned char *final, const php_hash_ops } static void php_hash_do_hash_hmac( - zval *return_value, zend_string *algo, char *data, size_t data_len, char *key, size_t key_len, zend_bool raw_output, bool isfilename + zval *return_value, zend_string *algo, char *data, size_t data_len, char *key, size_t key_len, bool raw_output, bool isfilename ) /* {{{ */ { zend_string *digest; unsigned char *K; @@ -578,7 +578,7 @@ PHP_FUNCTION(hash_hmac) zend_string *algo; char *data, *key; size_t data_len, key_len; - zend_bool raw_output = 0; + bool raw_output = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sss|b", &algo, &data, &data_len, &key, &key_len, &raw_output) == FAILURE) { RETURN_THROWS(); @@ -595,7 +595,7 @@ PHP_FUNCTION(hash_hmac_file) zend_string *algo; char *data, *key; size_t data_len, key_len; - zend_bool raw_output = 0; + bool raw_output = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sss|b", &algo, &data, &data_len, &key, &key_len, &raw_output) == FAILURE) { RETURN_THROWS(); @@ -777,7 +777,7 @@ PHP_FUNCTION(hash_final) { zval *zhash; php_hashcontext_object *hash; - zend_bool raw_output = 0; + bool raw_output = 0; zend_string *digest; size_t digest_len; @@ -986,7 +986,7 @@ PHP_FUNCTION(hash_pbkdf2) unsigned char *computed_salt, *digest, *temp, *result, *K1, *K2 = NULL; zend_long loops, i, j, iterations, digest_length = 0, length = 0; size_t pass_len, salt_len = 0; - zend_bool raw_output = 0; + bool raw_output = 0; const php_hash_ops *ops; void *context; HashTable *args; diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 90c209cbcb..7ccbb82662 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -1820,7 +1820,7 @@ PHP_FUNCTION(iconv_substr) size_t charset_len; zend_string *str; zend_long offset, length = 0; - zend_bool len_is_null = 1; + bool len_is_null = 1; php_iconv_err_t err; diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 152e21731f..aa547da000 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -2661,7 +2661,7 @@ PHP_FUNCTION(imap_sort) zval *imap_conn_obj; zend_string *criteria = NULL, *charset = NULL; zend_long sort, flags = 0; - zend_bool rev; + bool rev; php_imap_object *imap_conn_struct; unsigned long *slst, *sl; char *search_criteria; diff --git a/ext/imap/php_imap.h b/ext/imap/php_imap.h index 9ff0cf9c73..a35c284106 100644 --- a/ext/imap/php_imap.h +++ b/ext/imap/php_imap.h @@ -142,7 +142,7 @@ ZEND_BEGIN_MODULE_GLOBALS(imap) #endif /* php_stream for php_mail_gets() */ php_stream *gets_stream; - zend_bool enable_rsh; + bool enable_rsh; ZEND_END_MODULE_GLOBALS(imap) #if defined(ZTS) && defined(COMPILE_DL_IMAP) diff --git a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp index f17733da24..eb54c321f6 100644 --- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp +++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp @@ -35,7 +35,7 @@ static void _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAMETERS) { char *rules; size_t rules_len; - zend_bool compiled = 0; + bool compiled = 0; UErrorCode status = U_ZERO_ERROR; BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp index bcef9cf3b9..19d43b2b23 100644 --- a/ext/intl/calendar/calendar_methods.cpp +++ b/ext/intl/calendar/calendar_methods.cpp @@ -165,7 +165,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_keyword_values_for_locale) *locale; size_t key_len, locale_len; - zend_bool commonly_used; + bool commonly_used; intl_error_reset(NULL); if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssb", @@ -440,7 +440,7 @@ U_CFUNC PHP_FUNCTION(intlcal_roll) U_CFUNC PHP_FUNCTION(intlcal_clear) { zend_long field; - zend_bool field_is_null = 1; + bool field_is_null = 1; CALENDAR_METHOD_INIT_VARS; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), @@ -757,7 +757,7 @@ U_CFUNC PHP_FUNCTION(intlcal_is_set) U_CFUNC PHP_FUNCTION(intlcal_is_weekend) { double date; - zend_bool date_is_null = 1; + bool date_is_null = 1; CALENDAR_METHOD_INIT_VARS; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), @@ -799,7 +799,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_first_day_of_week) U_CFUNC PHP_FUNCTION(intlcal_set_lenient) { - zend_bool is_lenient; + bool is_lenient; CALENDAR_METHOD_INIT_VARS; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), diff --git a/ext/intl/calendar/gregoriancalendar_methods.cpp b/ext/intl/calendar/gregoriancalendar_methods.cpp index 64b7539789..9cbb62ebdb 100644 --- a/ext/intl/calendar/gregoriancalendar_methods.cpp +++ b/ext/intl/calendar/gregoriancalendar_methods.cpp @@ -44,7 +44,7 @@ static inline GregorianCalendar *fetch_greg(Calendar_object *co) { } static void _php_intlgregcal_constructor_body( - INTERNAL_FUNCTION_PARAMETERS, zend_bool is_constructor) + INTERNAL_FUNCTION_PARAMETERS, bool is_constructor) { zval *tz_object = NULL; zval args_a[6] = {0}, diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c index 697ebcda0b..90971302ce 100644 --- a/ext/intl/converter/converter.c +++ b/ext/intl/converter/converter.c @@ -134,7 +134,7 @@ PHP_METHOD(UConverter, fromUCallback) { /* }}} */ /* {{{ php_converter_check_limits */ -static inline zend_bool php_converter_check_limits(php_converter_object *objval, zend_long available, zend_long needed) { +static inline bool php_converter_check_limits(php_converter_object *objval, zend_long available, zend_long needed) { if (available < needed) { php_converter_throw_failure(objval, U_BUFFER_OVERFLOW_ERROR, "Buffer overrun " ZEND_LONG_FMT " bytes needed, " ZEND_LONG_FMT " available", needed, available); return 0; @@ -333,8 +333,8 @@ static void php_converter_from_u_callback(const void *context, /* }}} */ /* {{{ php_converter_set_callbacks */ -static inline zend_bool php_converter_set_callbacks(php_converter_object *objval, UConverter *cnv) { - zend_bool ret = 1; +static inline bool php_converter_set_callbacks(php_converter_object *objval, UConverter *cnv) { + bool ret = 1; UErrorCode error = U_ZERO_ERROR; if (objval->obj.ce == php_converter_ce) { @@ -363,7 +363,7 @@ static inline zend_bool php_converter_set_callbacks(php_converter_object *objval /* }}} */ /* {{{ php_converter_set_encoding */ -static zend_bool php_converter_set_encoding(php_converter_object *objval, +static bool php_converter_set_encoding(php_converter_object *objval, UConverter **pcnv, const char *enc, size_t enc_len ) { @@ -705,7 +705,7 @@ PHP_METHOD(UConverter, convert) { char *str; size_t str_len; zend_string *ret; - zend_bool reverse = 0; + bool reverse = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|b", &str, &str_len, &reverse) == FAILURE) { diff --git a/ext/intl/dateformat/dateformat_attr.c b/ext/intl/dateformat/dateformat_attr.c index 2d2dbdfb6c..eee33b9925 100644 --- a/ext/intl/dateformat/dateformat_attr.c +++ b/ext/intl/dateformat/dateformat_attr.c @@ -69,7 +69,7 @@ PHP_FUNCTION( datefmt_get_pattern ) UChar value_buf[64]; uint32_t length = USIZE( value_buf ); UChar* value = value_buf; - zend_bool is_pattern_localized = false; + bool is_pattern_localized = false; DATE_FORMAT_METHOD_INIT_VARS; @@ -106,7 +106,7 @@ PHP_FUNCTION( datefmt_set_pattern ) size_t value_len = 0; int32_t slength = 0; UChar* svalue = NULL; - zend_bool is_pattern_localized = false; + bool is_pattern_localized = false; DATE_FORMAT_METHOD_INIT_VARS; @@ -184,7 +184,7 @@ PHP_FUNCTION( datefmt_is_lenient ) /* {{{ Set formatter lenient. */ PHP_FUNCTION( datefmt_set_lenient ) { - zend_bool isLenient = false; + bool isLenient = false; DATE_FORMAT_METHOD_INIT_VARS; diff --git a/ext/intl/dateformat/dateformat_attrcpp.cpp b/ext/intl/dateformat/dateformat_attrcpp.cpp index 343ef170d2..547c00c14c 100644 --- a/ext/intl/dateformat/dateformat_attrcpp.cpp +++ b/ext/intl/dateformat/dateformat_attrcpp.cpp @@ -158,7 +158,7 @@ U_CFUNC PHP_FUNCTION(datefmt_set_calendar) { zend_object *calendar_obj; zend_long calendar_long; - zend_bool calendar_is_null; + bool calendar_is_null; DATE_FORMAT_METHOD_INIT_VARS; object = getThis(); diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp index e80b5d0131..40d2077c84 100644 --- a/ext/intl/dateformat/dateformat_create.cpp +++ b/ext/intl/dateformat/dateformat_create.cpp @@ -55,7 +55,7 @@ static zend_result datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS) zend_long time_type = 0; zend_object *calendar_obj = NULL; zend_long calendar_long = 0; - zend_bool calendar_is_null = 1; + bool calendar_is_null = 1; Calendar *cal = NULL; zend_long calendar_type; bool calendar_owned; diff --git a/ext/intl/dateformat/dateformat_helpers.cpp b/ext/intl/dateformat/dateformat_helpers.cpp index 46c909bf95..b6700fdf40 100644 --- a/ext/intl/dateformat/dateformat_helpers.cpp +++ b/ext/intl/dateformat/dateformat_helpers.cpp @@ -29,7 +29,7 @@ extern "C" { using icu::GregorianCalendar; int datefmt_process_calendar_arg( - zend_object *calendar_obj, zend_long calendar_long, zend_bool calendar_is_null, Locale const& locale, + zend_object *calendar_obj, zend_long calendar_long, bool calendar_is_null, Locale const& locale, const char *func_name, intl_error *err, Calendar*& cal, zend_long& cal_int_type, bool& calendar_owned ) { char *msg; diff --git a/ext/intl/dateformat/dateformat_helpers.h b/ext/intl/dateformat/dateformat_helpers.h index 1f2d7eb32e..50466e6ca6 100644 --- a/ext/intl/dateformat/dateformat_helpers.h +++ b/ext/intl/dateformat/dateformat_helpers.h @@ -31,7 +31,7 @@ using icu::Calendar; using icu::DateFormat; int datefmt_process_calendar_arg( - zend_object *calendar_obj, zend_long calendar_long, zend_bool calendar_is_null, Locale const& locale, + zend_object *calendar_obj, zend_long calendar_long, bool calendar_is_null, Locale const& locale, const char *func_name, intl_error *err, Calendar*& cal, zend_long& cal_int_type, bool& calendar_owned ); diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c index 7d8df14d2e..88a5920001 100644 --- a/ext/intl/grapheme/grapheme_string.c +++ b/ext/intl/grapheme/grapheme_string.c @@ -345,7 +345,7 @@ PHP_FUNCTION(grapheme_substr) UBreakIterator* bi = NULL; int sub_str_start_pos, sub_str_end_pos; int32_t (*iter_func)(UBreakIterator *); - zend_bool no_length = 1; + bool no_length = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l!", &str, &str_len, &lstart, &length, &no_length) == FAILURE) { RETURN_THROWS(); @@ -546,7 +546,7 @@ static void strstr_common_handler(INTERNAL_FUNCTION_PARAMETERS, int f_ignore_cas const char *found; size_t haystack_len, needle_len; int32_t ret_pos, uchar_pos; - zend_bool part = 0; + bool part = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|b", &haystack, &haystack_len, &needle, &needle_len, &part) == FAILURE) { RETURN_THROWS(); diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index 9357475f55..d002fd0f82 100644 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -1171,7 +1171,7 @@ PHP_FUNCTION(locale_filter_matches) char* cur_lang_tag = NULL; char* cur_loc_range = NULL; - zend_bool boolCanonical = 0; + bool boolCanonical = 0; UErrorCode status = U_ZERO_ERROR; intl_error_reset( NULL ); @@ -1444,7 +1444,7 @@ PHP_FUNCTION(locale_lookup) zval* arr = NULL; HashTable* hash_arr = NULL; - zend_bool boolCanonical = 0; + bool boolCanonical = 0; zend_string* result_str = NULL; intl_error_reset( NULL ); diff --git a/ext/intl/php_intl.h b/ext/intl/php_intl.h index b878371764..4dfb24e96e 100644 --- a/ext/intl/php_intl.h +++ b/ext/intl/php_intl.h @@ -50,7 +50,7 @@ ZEND_BEGIN_MODULE_GLOBALS(intl) UBreakIterator* grapheme_iterator; intl_error g_error; zend_long error_level; - zend_bool use_exceptions; + bool use_exceptions; ZEND_END_MODULE_GLOBALS(intl) #if defined(ZTS) && defined(COMPILE_DL_INTL) diff --git a/ext/intl/resourcebundle/resourcebundle_class.c b/ext/intl/resourcebundle/resourcebundle_class.c index 98a33b9284..ef82b2fd48 100644 --- a/ext/intl/resourcebundle/resourcebundle_class.c +++ b/ext/intl/resourcebundle/resourcebundle_class.c @@ -80,7 +80,7 @@ static int resourcebundle_ctor(INTERNAL_FUNCTION_PARAMETERS) size_t bundlename_len = 0; const char *locale; size_t locale_len = 0; - zend_bool fallback = 1; + bool fallback = 1; zval *object = return_value; ResourceBundle_object *rb = Z_INTL_RESOURCEBUNDLE_P( object ); @@ -167,7 +167,7 @@ static void resourcebundle_array_fetch(zend_object *object, zval *offset, zval * { int32_t meindex = 0; char * mekey = NULL; - zend_bool is_numeric = 0; + bool is_numeric = 0; char *pbuf; ResourceBundle_object *rb; @@ -231,7 +231,7 @@ zval *resourcebundle_array_get(zend_object *object, zval *offset, int type, zval /* {{{ Get resource identified by numerical index or key name. */ PHP_FUNCTION( resourcebundle_get ) { - zend_bool fallback = 1; + bool fallback = 1; zval * offset; zval * object; diff --git a/ext/intl/resourcebundle/resourcebundle_iterator.h b/ext/intl/resourcebundle/resourcebundle_iterator.h index fa2e24d848..dc92fa824e 100644 --- a/ext/intl/resourcebundle/resourcebundle_iterator.h +++ b/ext/intl/resourcebundle/resourcebundle_iterator.h @@ -22,7 +22,7 @@ typedef struct { zend_object_iterator intern; ResourceBundle_object *subject; - zend_bool is_table; + bool is_table; zend_long length; zval current; char *currentkey; diff --git a/ext/intl/timezone/timezone_class.h b/ext/intl/timezone/timezone_class.h index 8fe4524415..3d5f04008a 100644 --- a/ext/intl/timezone/timezone_class.h +++ b/ext/intl/timezone/timezone_class.h @@ -39,7 +39,7 @@ typedef struct { const TimeZone *utimezone; //whether to delete the timezone on object free - zend_bool should_delete; + bool should_delete; zend_object zo; } TimeZone_object; diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp index 06b807f82f..6b48d4f8ee 100644 --- a/ext/intl/timezone/timezone_methods.cpp +++ b/ext/intl/timezone/timezone_methods.cpp @@ -224,7 +224,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration) size_t region_len = 0; int32_t offset, *offsetp = NULL; - zend_bool arg3isnull = 1; + bool arg3isnull = 1; intl_error_reset(NULL); @@ -411,7 +411,7 @@ U_CFUNC PHP_FUNCTION(intltz_use_daylight_time) U_CFUNC PHP_FUNCTION(intltz_get_offset) { double date; - zend_bool local; + bool local; zval *rawOffsetArg, *dstOffsetArg; int32_t rawOffset, @@ -484,7 +484,7 @@ static const TimeZone::EDisplayType display_types[] = { U_CFUNC PHP_FUNCTION(intltz_get_display_name) { - zend_bool daylight = 0; + bool daylight = 0; zend_long display_type = TimeZone::LONG; const char *locale_str = NULL; size_t dummy = 0; diff --git a/ext/json/json.c b/ext/json/json.c index 669f2851e7..872766239e 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -265,8 +265,8 @@ PHP_FUNCTION(json_decode) { char *str; size_t str_len; - zend_bool assoc = 0; /* return JS objects as PHP objects by default */ - zend_bool assoc_null = 1; + bool assoc = 0; /* return JS objects as PHP objects by default */ + bool assoc_null = 1; zend_long depth = PHP_JSON_PARSER_DEFAULT_DEPTH; zend_long options = 0; diff --git a/ext/json/json_scanner.re b/ext/json/json_scanner.re index 03ccdde58b..c8e3e0ebf5 100644 --- a/ext/json/json_scanner.re +++ b/ext/json/json_scanner.re @@ -168,7 +168,7 @@ std: return PHP_JSON_T_FALSE; } <JS>INT { - zend_bool bigint = 0, negative = s->token[0] == '-'; + bool bigint = 0, negative = s->token[0] == '-'; size_t digits = (size_t) (s->cursor - s->token - negative); if (digits >= PHP_JSON_INT_MAX_LENGTH) { if (digits == PHP_JSON_INT_MAX_LENGTH) { diff --git a/ext/json/php_json.h b/ext/json/php_json.h index ee8affa1d1..f6d7b376bd 100644 --- a/ext/json/php_json.h +++ b/ext/json/php_json.h @@ -100,7 +100,7 @@ PHP_JSON_API int php_json_encode_ex(smart_str *buf, zval *val, int options, zend PHP_JSON_API int php_json_encode(smart_str *buf, zval *val, int options); PHP_JSON_API int php_json_decode_ex(zval *return_value, const char *str, size_t str_len, zend_long options, zend_long depth); -static inline int php_json_decode(zval *return_value, const char *str, int str_len, zend_bool assoc, zend_long depth) +static inline int php_json_decode(zval *return_value, const char *str, int str_len, bool assoc, zend_long depth) { return php_json_decode_ex(return_value, str, str_len, assoc ? PHP_JSON_OBJECT_AS_ARRAY : 0, depth); } diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index c4f840b823..0d49bf188e 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -3563,7 +3563,7 @@ static void php_ldap_do_rename(INTERNAL_FUNCTION_PARAMETERS, int ext) int rc, msgid; char *dn, *newrdn, *newparent; size_t dn_len, newrdn_len, newparent_len; - zend_bool deleteoldrdn; + bool deleteoldrdn; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsssb|a!", &link, &dn, &dn_len, &newrdn, &newrdn_len, &newparent, &newparent_len, &deleteoldrdn, &serverctrls) != SUCCESS) { RETURN_THROWS(); @@ -3748,7 +3748,7 @@ PHP_FUNCTION(ldap_set_rebind_proc) /* }}} */ #endif -static zend_string* php_ldap_do_escape(const zend_bool *map, const char *value, size_t valuelen, zend_long flags) +static zend_string* php_ldap_do_escape(const bool *map, const char *value, size_t valuelen, zend_long flags) { char hex[] = "0123456789abcdef"; size_t i, p = 0; @@ -3785,7 +3785,7 @@ static zend_string* php_ldap_do_escape(const zend_bool *map, const char *value, return ret; } -static void php_ldap_escape_map_set_chars(zend_bool *map, const char *chars, const size_t charslen, char escape) +static void php_ldap_escape_map_set_chars(bool *map, const char *chars, const size_t charslen, char escape) { size_t i = 0; while (i < charslen) { @@ -3799,7 +3799,7 @@ PHP_FUNCTION(ldap_escape) size_t valuelen = 0, ignoreslen = 0; int i; zend_long flags = 0; - zend_bool map[256] = {0}, havecharlist = 0; + bool map[256] = {0}, havecharlist = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|sl", &value, &valuelen, &ignores, &ignoreslen, &flags) != SUCCESS) { RETURN_THROWS(); diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 7dc4804905..b3ce853ef1 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -939,7 +939,7 @@ PHP_FUNCTION(libxml_set_streams_context) PHP_FUNCTION(libxml_use_internal_errors) { xmlStructuredErrorFunc current_handler; - zend_bool use_errors, use_errors_is_null = 1, retval; + bool use_errors, use_errors_is_null = 1, retval; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL @@ -1059,9 +1059,9 @@ PHP_FUNCTION(libxml_clear_errors) } /* }}} */ -PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable) /* {{{ */ +PHP_LIBXML_API bool php_libxml_disable_entity_loader(bool disable) /* {{{ */ { - zend_bool old = LIBXML(entity_loader_disabled); + bool old = LIBXML(entity_loader_disabled); LIBXML(entity_loader_disabled) = disable; return old; @@ -1070,7 +1070,7 @@ PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable) /* /* {{{ Disable/Enable ability to load external entities */ PHP_FUNCTION(libxml_disable_entity_loader) { - zend_bool disable = 1; + bool disable = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h index 85ffcd3969..784bc457ae 100644 --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@ -47,7 +47,7 @@ ZEND_BEGIN_MODULE_GLOBALS(libxml) zend_fcall_info fci; zend_fcall_info_cache fcc; } entity_loader; - zend_bool entity_loader_disabled; + bool entity_loader_disabled; ZEND_END_MODULE_GLOBALS(libxml) typedef struct _libxml_doc_props { @@ -106,7 +106,7 @@ PHP_LIBXML_API void php_libxml_ctx_error(void *ctx, const char *msg, ...); PHP_LIBXML_API int php_libxml_xmlCheckUTF8(const unsigned char *s); PHP_LIBXML_API void php_libxml_switch_context(zval *context, zval *oldcontext); PHP_LIBXML_API void php_libxml_issue_error(int level, const char *msg); -PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable); +PHP_LIBXML_API bool php_libxml_disable_entity_loader(bool disable); /* Init/shutdown functions*/ PHP_LIBXML_API void php_libxml_initialize(void); diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index dd3b83649d..f7223e973c 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -73,9 +73,9 @@ static void php_mb_gpc_get_detect_order(const zend_encoding ***list, size_t *lis static void php_mb_gpc_set_input_encoding(const zend_encoding *encoding); -static inline zend_bool php_mb_is_unsupported_no_encoding(enum mbfl_no_encoding no_enc); +static inline bool php_mb_is_unsupported_no_encoding(enum mbfl_no_encoding no_enc); -static inline zend_bool php_mb_is_no_encoding_utf8(enum mbfl_no_encoding no_enc); +static inline bool php_mb_is_no_encoding_utf8(enum mbfl_no_encoding no_enc); /* }}} */ /* {{{ php_mb_default_identify_list */ @@ -252,14 +252,14 @@ static size_t count_commas(const char *p, const char *end) { */ static zend_result php_mb_parse_encoding_list(const char *value, size_t value_length, const mbfl_encoding ***return_list, size_t *return_size, bool persistent, uint32_t arg_num, - zend_bool allow_pass_encoding) + bool allow_pass_encoding) { if (value == NULL || value_length == 0) { *return_list = NULL; *return_size = 0; return SUCCESS; } else { - zend_bool included_auto; + bool included_auto; size_t n, size; char *p1, *endp, *tmpstr; const mbfl_encoding **entry, **list; @@ -347,7 +347,7 @@ static int php_mb_parse_encoding_array(HashTable *target_hash, const mbfl_encodi size_t size = zend_hash_num_elements(target_hash) + MBSTRG(default_detect_order_list_size); const mbfl_encoding **list = ecalloc(size, sizeof(mbfl_encoding*)); const mbfl_encoding **entry = list; - zend_bool included_auto = 0; + bool included_auto = 0; size_t n = 0; zval *hash_entry; ZEND_HASH_FOREACH_VAL(target_hash, hash_entry) { @@ -1421,7 +1421,7 @@ PHP_FUNCTION(mb_substitute_character) { zend_string *substitute_character = NULL; zend_long substitute_codepoint; - zend_bool substitute_is_null = 1; + bool substitute_is_null = 1; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL @@ -2000,7 +2000,7 @@ static void php_mb_strstr_variants(INTERNAL_FUNCTION_PARAMETERS, unsigned int va char *haystack_val, *needle_val; mbfl_string haystack, needle, result, *ret = NULL; zend_string *encoding_name = NULL; - zend_bool part = 0; + bool part = 0; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STRING(haystack_val, haystack.len) @@ -2124,7 +2124,7 @@ PHP_FUNCTION(mb_substr) zend_long from, len; size_t real_from, real_len; size_t str_len; - zend_bool len_is_null = 1; + bool len_is_null = 1; mbfl_string string, result, *ret; ZEND_PARSE_PARAMETERS_START(2, 4) @@ -2188,7 +2188,7 @@ PHP_FUNCTION(mb_strcut) zend_string *encoding = NULL; char *string_val; zend_long from, len; - zend_bool len_is_null = 1; + bool len_is_null = 1; mbfl_string string, result, *ret; ZEND_PARSE_PARAMETERS_START(2, 4) @@ -2332,7 +2332,7 @@ PHP_FUNCTION(mb_strimwidth) /* See mbfl_no_encoding definition for list of unsupported encodings */ -static inline zend_bool php_mb_is_unsupported_no_encoding(enum mbfl_no_encoding no_enc) +static inline bool php_mb_is_unsupported_no_encoding(enum mbfl_no_encoding no_enc) { return ((no_enc >= mbfl_no_encoding_invalid && no_enc <= mbfl_no_encoding_qprint) || (no_enc >= mbfl_no_encoding_utf7 && no_enc <= mbfl_no_encoding_utf7imap) @@ -2342,7 +2342,7 @@ static inline zend_bool php_mb_is_unsupported_no_encoding(enum mbfl_no_encoding /* See mbfl_no_encoding definition for list of UTF-8 encodings */ -static inline zend_bool php_mb_is_no_encoding_utf8(enum mbfl_no_encoding no_enc) +static inline bool php_mb_is_no_encoding_utf8(enum mbfl_no_encoding no_enc) { return (no_enc >= mbfl_no_encoding_utf8 && no_enc <= mbfl_no_encoding_utf8_sb); } @@ -2501,7 +2501,7 @@ PHP_FUNCTION(mb_convert_encoding) HashTable *input_ht, *from_encodings_ht = NULL; const mbfl_encoding **from_encodings; size_t num_from_encodings; - zend_bool free_from_encodings; + bool free_from_encodings; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY_HT_OR_STR(input_ht, input_str) @@ -2673,13 +2673,13 @@ PHP_FUNCTION(mb_detect_encoding) size_t str_len; zend_string *encoding_str = NULL; HashTable *encoding_ht = NULL; - zend_bool strict = 0; + bool strict = 0; mbfl_string string; const mbfl_encoding *ret; const mbfl_encoding **elist; size_t size; - zend_bool free_elist; + bool free_elist; ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STRING(str, str_len) @@ -3184,7 +3184,7 @@ PHP_FUNCTION(mb_encode_numericentity) zend_string *encoding = NULL; int mapsize; HashTable *target_hash; - zend_bool is_hex = 0; + bool is_hex = 0; mbfl_string string, result, *ret; ZEND_PARSE_PARAMETERS_START(2, 4) diff --git a/ext/mbstring/mbstring.h b/ext/mbstring/mbstring.h index 561efeb422..eaef0bf63d 100644 --- a/ext/mbstring/mbstring.h +++ b/ext/mbstring/mbstring.h @@ -95,8 +95,8 @@ ZEND_BEGIN_MODULE_GLOBALS(mbstring) int current_filter_illegal_mode; int current_filter_illegal_substchar; enum mbfl_no_language language; - zend_bool encoding_translation; - zend_bool strict_detection; + bool encoding_translation; + bool strict_detection; size_t illegalchars; mbfl_buffer_converter *outconv; void *http_output_conv_mimetypes; @@ -107,9 +107,9 @@ ZEND_BEGIN_MODULE_GLOBALS(mbstring) zend_string *last_used_encoding_name; const mbfl_encoding *last_used_encoding; /* Whether an explicit internal_encoding / http_output / http_input encoding was set. */ - zend_bool internal_encoding_set; - zend_bool http_output_set; - zend_bool http_input_set; + bool internal_encoding_set; + bool http_output_set; + bool http_input_set; #ifdef HAVE_MBREGEX zend_long regex_retry_limit; #endif diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 50c5038f15..c250547880 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -70,7 +70,7 @@ zend_class_entry *mysqli_warning_class_entry; zend_class_entry *mysqli_exception_class_entry; -typedef int (*mysqli_read_t)(mysqli_object *obj, zval *rv, zend_bool quiet); +typedef int (*mysqli_read_t)(mysqli_object *obj, zval *rv, bool quiet); typedef int (*mysqli_write_t)(mysqli_object *obj, zval *newval); typedef struct _mysqli_prop_handler { @@ -277,7 +277,7 @@ static void mysqli_warning_free_storage(zend_object *object) /* }}} */ /* {{{ mysqli_read_na */ -static int mysqli_read_na(mysqli_object *obj, zval *retval, zend_bool quiet) +static int mysqli_read_na(mysqli_object *obj, zval *retval, bool quiet) { if (!quiet) { zend_throw_error(NULL, "Cannot read property"); diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 1670a65054..56f762ab09 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -71,7 +71,7 @@ mysqli_escape_string_for_tx_name_in_comment(const char * const name) { char * ret = NULL; if (name) { - zend_bool warned = FALSE; + bool warned = FALSE; const char * p_orig = name; char * p_copy; p_copy = ret = emalloc(strlen(name) + 1 + 2 + 2 + 1); /* space, open, close, NullS */ @@ -107,7 +107,7 @@ mysqli_escape_string_for_tx_name_in_comment(const char * const name) /* }}} */ /* {{{ mysqli_commit_or_rollback_libmysql */ -static int mysqli_commit_or_rollback_libmysql(MYSQL * conn, zend_bool commit, const uint32_t mode, const char * const name) +static int mysqli_commit_or_rollback_libmysql(MYSQL * conn, bool commit, const uint32_t mode, const char * const name) { int ret; smart_str tmp_str = {0}; @@ -161,7 +161,7 @@ PHP_FUNCTION(mysqli_autocommit) { MY_MYSQL *mysql; zval *mysql_link; - zend_bool automode; + bool automode; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Ob", &mysql_link, mysqli_link_class_entry, &automode) == FAILURE) { RETURN_THROWS(); @@ -1057,7 +1057,7 @@ void mysqli_stmt_fetch_mysqlnd(INTERNAL_FUNCTION_PARAMETERS) { MY_STMT *stmt; zval *mysql_stmt; - zend_bool fetched_anything; + bool fetched_anything; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { RETURN_THROWS(); @@ -1426,7 +1426,7 @@ PHP_FUNCTION(mysqli_info) /* }}} */ /* {{{ php_mysqli_init() */ -void php_mysqli_init(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_method) +void php_mysqli_init(INTERNAL_FUNCTION_PARAMETERS, bool is_method) { MYSQLI_RESOURCE *mysqli_resource; MY_MYSQL *mysql; diff --git a/ext/mysqli/mysqli_driver.c b/ext/mysqli/mysqli_driver.c index c3fb5e48bb..5557b0ac2b 100644 --- a/ext/mysqli/mysqli_driver.c +++ b/ext/mysqli/mysqli_driver.c @@ -27,7 +27,7 @@ #include "zend_exceptions.h" #define MAP_PROPERTY_MYG_BOOL_READ(name, value) \ -static int name(mysqli_object *obj, zval *retval, zend_bool quiet) \ +static int name(mysqli_object *obj, zval *retval, bool quiet) \ { \ ZVAL_BOOL(retval, MyG(value)); \ return SUCCESS; \ @@ -41,7 +41,7 @@ static int name(mysqli_object *obj, zval *value) \ } \ #define MAP_PROPERTY_MYG_LONG_READ(name, value) \ -static int name(mysqli_object *obj, zval *retval, zend_bool quiet) \ +static int name(mysqli_object *obj, zval *retval, bool quiet) \ { \ ZVAL_LONG(retval, MyG(value)); \ return SUCCESS; \ @@ -55,7 +55,7 @@ static int name(mysqli_object *obj, zval *value) \ } \ #define MAP_PROPERTY_MYG_STRING_READ(name, value) \ -static int name(mysqli_object *obj, zval *retval, zend_bool quiet) \ +static int name(mysqli_object *obj, zval *retval, bool quiet) \ { \ ZVAL_STRING(retval, MyG(value)); \ return SUCCESS; \ @@ -79,7 +79,7 @@ static int driver_report_write(mysqli_object *obj, zval *value) /* }}} */ /* {{{ property driver_client_version_read */ -static int driver_client_version_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int driver_client_version_read(mysqli_object *obj, zval *retval, bool quiet) { ZVAL_LONG(retval, mysql_get_client_version()); @@ -88,7 +88,7 @@ static int driver_client_version_read(mysqli_object *obj, zval *retval, zend_boo /* }}} */ /* {{{ property driver_client_info_read */ -static int driver_client_info_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int driver_client_info_read(mysqli_object *obj, zval *retval, bool quiet) { ZVAL_STRING(retval, (char *)mysql_get_client_info()); @@ -97,7 +97,7 @@ static int driver_client_info_read(mysqli_object *obj, zval *retval, zend_bool q /* }}} */ /* {{{ property driver_driver_version_read */ -static int driver_driver_version_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int driver_driver_version_read(mysqli_object *obj, zval *retval, bool quiet) { ZVAL_LONG(retval, MYSQLI_VERSION_ID); diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 30b197d10d..4870a4319a 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -47,7 +47,7 @@ static void php_mysqli_set_error(zend_long mysql_errno, char *mysql_err) } /* }}} */ -void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_connect, zend_bool in_ctor) /* {{{ */ +void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, bool is_real_connect, bool in_ctor) /* {{{ */ { MY_MYSQL *mysql = NULL; MYSQLI_RESOURCE *mysqli_resource = NULL; @@ -56,14 +56,14 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne *ssl_key = NULL, *ssl_cert = NULL, *ssl_ca = NULL, *ssl_capath = NULL, *ssl_cipher = NULL; size_t hostname_len = 0, username_len = 0, passwd_len = 0, dbname_len = 0, socket_len = 0; - zend_bool persistent = FALSE, ssl = FALSE; + bool persistent = FALSE, ssl = FALSE; zend_long port = 0, flags = 0; - zend_bool port_is_null = 1; + bool port_is_null = 1; zend_string *hash_key = NULL; - zend_bool new_connection = FALSE; + bool new_connection = FALSE; zend_resource *le; mysqli_plist_entry *plist = NULL; - zend_bool self_alloced = 0; + bool self_alloced = 0; #if !defined(MYSQL_USE_MYSQLND) @@ -1203,7 +1203,7 @@ PHP_FUNCTION(mysqli_begin_transaction) #ifndef MYSQLI_USE_MYSQLND /* {{{ */ -static int mysqli_savepoint_libmysql(MYSQL * conn, const char * const name, zend_bool release) +static int mysqli_savepoint_libmysql(MYSQL * conn, const char * const name, bool release) { int ret; char * query; diff --git a/ext/mysqli/mysqli_priv.h b/ext/mysqli/mysqli_priv.h index f537514968..0e8baba576 100644 --- a/ext/mysqli/mysqli_priv.h +++ b/ext/mysqli/mysqli_priv.h @@ -127,8 +127,8 @@ if ((MyG(report_mode) & MYSQLI_REPORT_ERROR) && mysql_stmt_errno(stmt)) { \ php_mysqli_report_error(mysql_stmt_sqlstate(stmt), mysql_stmt_errno(stmt), mysql_stmt_error(stmt)); \ } -void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_connect, zend_bool in_ctor); +void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, bool is_real_connect, bool in_ctor); -void php_mysqli_init(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_method); +void php_mysqli_init(INTERNAL_FUNCTION_PARAMETERS, bool is_method); #endif /* MYSQLI_PRIV_H */ diff --git a/ext/mysqli/mysqli_prop.c b/ext/mysqli/mysqli_prop.c index 2ee059c756..9749fe5632 100644 --- a/ext/mysqli/mysqli_prop.c +++ b/ext/mysqli/mysqli_prop.c @@ -72,7 +72,7 @@ if (!obj->ptr) { \ } #define MYSQLI_MAP_PROPERTY_FUNC_LONG( __func, __int_func, __get_type, __ret_type, __ret_type_sprint_mod)\ -static int __func(mysqli_object *obj, zval *retval, zend_bool quiet) \ +static int __func(mysqli_object *obj, zval *retval, bool quiet) \ {\ __ret_type l;\ __get_type;\ @@ -90,7 +90,7 @@ static int __func(mysqli_object *obj, zval *retval, zend_bool quiet) \ } #define MYSQLI_MAP_PROPERTY_FUNC_STRING(__func, __int_func, __get_type)\ -static int __func(mysqli_object *obj, zval *retval, zend_bool quiet)\ +static int __func(mysqli_object *obj, zval *retval, bool quiet)\ {\ char *c;\ __get_type;\ @@ -108,7 +108,7 @@ static int __func(mysqli_object *obj, zval *retval, zend_bool quiet)\ } /* {{{ property link_client_version_read */ -static int link_client_version_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int link_client_version_read(mysqli_object *obj, zval *retval, bool quiet) { ZVAL_LONG(retval, MYSQL_VERSION_ID); @@ -117,7 +117,7 @@ static int link_client_version_read(mysqli_object *obj, zval *retval, zend_bool /* }}} */ /* {{{ property link_client_info_read */ -static int link_client_info_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int link_client_info_read(mysqli_object *obj, zval *retval, bool quiet) { CHECK_STATUS(MYSQLI_STATUS_INITIALIZED, quiet); ZVAL_STRING(retval, MYSQL_SERVER_VERSION); @@ -127,7 +127,7 @@ static int link_client_info_read(mysqli_object *obj, zval *retval, zend_bool qui /* }}} */ /* {{{ property link_connect_errno_read */ -static int link_connect_errno_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int link_connect_errno_read(mysqli_object *obj, zval *retval, bool quiet) { ZVAL_LONG(retval, (zend_long)MyG(error_no)); @@ -136,7 +136,7 @@ static int link_connect_errno_read(mysqli_object *obj, zval *retval, zend_bool q /* }}} */ /* {{{ property link_connect_error_read */ -static int link_connect_error_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int link_connect_error_read(mysqli_object *obj, zval *retval, bool quiet) { if (MyG(error_msg)) { ZVAL_STRING(retval, MyG(error_msg)); @@ -149,7 +149,7 @@ static int link_connect_error_read(mysqli_object *obj, zval *retval, zend_bool q /* }}} */ /* {{{ property link_affected_rows_read */ -static int link_affected_rows_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int link_affected_rows_read(mysqli_object *obj, zval *retval, bool quiet) { MY_MYSQL *mysql; my_ulonglong rc; @@ -182,7 +182,7 @@ static int link_affected_rows_read(mysqli_object *obj, zval *retval, zend_bool q /* }}} */ /* {{{ property link_error_list_read */ -static int link_error_list_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int link_error_list_read(mysqli_object *obj, zval *retval, bool quiet) { MY_MYSQL *mysql; @@ -243,7 +243,7 @@ MYSQLI_MAP_PROPERTY_FUNC_LONG(link_warning_count_read, mysql_warning_count, MYSQ /* result properties */ /* {{{ property result_type_read */ -static int result_type_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int result_type_read(mysqli_object *obj, zval *retval, bool quiet) { MYSQL_RES *p; @@ -261,7 +261,7 @@ static int result_type_read(mysqli_object *obj, zval *retval, zend_bool quiet) /* }}} */ /* {{{ property result_lengths_read */ -static int result_lengths_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int result_lengths_read(mysqli_object *obj, zval *retval, bool quiet) { MYSQL_RES *p; #ifdef MYSQLI_USE_MYSQLND @@ -297,7 +297,7 @@ MYSQLI_MAP_PROPERTY_FUNC_LONG(result_num_rows_read, mysql_num_rows, MYSQLI_GET_R /* statement properties */ /* {{{ property stmt_id_read */ -static int stmt_id_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int stmt_id_read(mysqli_object *obj, zval *retval, bool quiet) { MY_STMT *p; @@ -316,7 +316,7 @@ static int stmt_id_read(mysqli_object *obj, zval *retval, zend_bool quiet) /* }}} */ /* {{{ property stmt_affected_rows_read */ -static int stmt_affected_rows_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int stmt_affected_rows_read(mysqli_object *obj, zval *retval, bool quiet) { MY_STMT *p; my_ulonglong rc; @@ -347,7 +347,7 @@ static int stmt_affected_rows_read(mysqli_object *obj, zval *retval, zend_bool q /* }}} */ /* {{{ property stmt_error_list_read */ -static int stmt_error_list_read(mysqli_object *obj, zval *retval, zend_bool quiet) +static int stmt_error_list_read(mysqli_object *obj, zval *retval, bool quiet) { MY_STMT * stmt; diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c index 30af6cb960..9d2b05b30a 100644 --- a/ext/mysqli/mysqli_warning.c +++ b/ext/mysqli/mysqli_warning.c @@ -195,7 +195,7 @@ PHP_METHOD(mysqli_warning, next) /* }}} */ /* {{{ property mysqli_warning_message */ -static int mysqli_warning_message(mysqli_object *obj, zval *retval, zend_bool quiet) +static int mysqli_warning_message(mysqli_object *obj, zval *retval, bool quiet) { MYSQLI_WARNING *w; @@ -215,7 +215,7 @@ static int mysqli_warning_message(mysqli_object *obj, zval *retval, zend_bool qu /* }}} */ /* {{{ property mysqli_warning_sqlstate */ -static int mysqli_warning_sqlstate(mysqli_object *obj, zval *retval, zend_bool quiet) +static int mysqli_warning_sqlstate(mysqli_object *obj, zval *retval, bool quiet) { MYSQLI_WARNING *w; @@ -235,7 +235,7 @@ static int mysqli_warning_sqlstate(mysqli_object *obj, zval *retval, zend_bool q /* }}} */ /* {{{ property mysqli_warning_error */ -static int mysqli_warning_errno(mysqli_object *obj, zval *retval, zend_bool quiet) +static int mysqli_warning_errno(mysqli_object *obj, zval *retval, bool quiet) { MYSQLI_WARNING *w; diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h index 16ed9ddefc..6ab9615985 100644 --- a/ext/mysqli/php_mysqli_structs.h +++ b/ext/mysqli/php_mysqli_structs.h @@ -88,7 +88,7 @@ typedef struct { zval li_read; php_stream *li_stream; unsigned int multi_query; - zend_bool persistent; + bool persistent; #ifdef MYSQLI_USE_MYSQLND int async_result_fetch_type; #endif @@ -124,7 +124,7 @@ struct st_mysqli_warning { typedef struct _mysqli_property_entry { const char *pname; size_t pname_length; - int (*r_func)(mysqli_object *obj, zval *retval, zend_bool quiet); + int (*r_func)(mysqli_object *obj, zval *retval, bool quiet); int (*w_func)(mysqli_object *obj, zval *value); } mysqli_property_entry; @@ -289,7 +289,7 @@ ZEND_BEGIN_MODULE_GLOBALS(mysqli) zend_long report_mode; HashTable *report_ht; zend_ulong multi_query; - zend_bool rollback_on_cached_plink; + bool rollback_on_cached_plink; ZEND_END_MODULE_GLOBALS(mysqli) #define MyG(v) ZEND_MODULE_GLOBALS_ACCESSOR(mysqli, v) diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h index e8db599b9d..09aee0cc81 100644 --- a/ext/mysqlnd/mysqlnd.h +++ b/ext/mysqlnd/mysqlnd.h @@ -80,7 +80,7 @@ PHPAPI const MYSQLND_CHARSET * mysqlnd_find_charset_name(const char * const char #define mysqlnd_connect(conn, host, user, pass, pass_len, db, db_len, port, socket, mysql_flags, client_api_flags) \ mysqlnd_connection_connect((conn), (host), (user), (pass), (pass_len), (db), (db_len), (port), (socket), (mysql_flags), (client_api_flags)) -PHPAPI MYSQLND * mysqlnd_connection_init(const size_t client_flags, const zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory); +PHPAPI MYSQLND * mysqlnd_connection_init(const size_t client_flags, const bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory); PHPAPI MYSQLND * mysqlnd_connection_connect(MYSQLND * conn, const char * const host, const char * const user, @@ -308,8 +308,8 @@ ZEND_BEGIN_MODULE_GLOBALS(mysqlnd) zend_long net_read_timeout; zend_long mempool_default_size; char * sha256_server_public_key; - zend_bool collect_statistics; - zend_bool collect_memory_statistics; + bool collect_statistics; + bool collect_memory_statistics; ZEND_END_MODULE_GLOBALS(mysqlnd) PHPAPI ZEND_EXTERN_MODULE_GLOBALS(mysqlnd) diff --git a/ext/mysqlnd/mysqlnd_alloc.c b/ext/mysqlnd/mysqlnd_alloc.c index 44a691e413..ad32ba666c 100644 --- a/ext/mysqlnd/mysqlnd_alloc.c +++ b/ext/mysqlnd/mysqlnd_alloc.c @@ -69,7 +69,7 @@ PHPAPI const char * mysqlnd_debug_std_no_trace_funcs[] = static void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D) { void *ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_emalloc_name); ret = emalloc_rel(REAL_SIZE(size)); @@ -85,10 +85,10 @@ static void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D) /* {{{ _mysqlnd_pemalloc */ -static void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D) +static void * _mysqlnd_pemalloc(size_t size, bool persistent MYSQLND_MEM_D) { void *ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_pemalloc_name); ret = pemalloc_rel(REAL_SIZE(size), persistent); @@ -110,7 +110,7 @@ static void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D) static void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) { void *ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_ecalloc_name); TRACE_ALLOC_INF_FMT("before: %lu", zend_memory_usage(FALSE)); ret = ecalloc_rel(nmemb, REAL_SIZE(size)); @@ -127,10 +127,10 @@ static void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) /* {{{ _mysqlnd_pecalloc */ -static void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D) +static void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, bool persistent MYSQLND_MEM_D) { void *ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_pecalloc_name); ret = pecalloc_rel(nmemb, REAL_SIZE(size), persistent); @@ -152,7 +152,7 @@ static void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persi static void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) { void *ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : 0; TRACE_ALLOC_ENTER(mysqlnd_erealloc_name); TRACE_ALLOC_INF_FMT("ptr=%p old_size=%lu, new_size=%lu", ptr, old_size, new_size); @@ -169,10 +169,10 @@ static void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) /* {{{ _mysqlnd_perealloc */ -static void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D) +static void * _mysqlnd_perealloc(void *ptr, size_t new_size, bool persistent MYSQLND_MEM_D) { void *ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : 0; TRACE_ALLOC_ENTER(mysqlnd_perealloc_name); TRACE_ALLOC_INF_FMT("ptr=%p old_size=%lu new_size=%lu persistent=%u", ptr, old_size, new_size, persistent); @@ -195,7 +195,7 @@ static void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persisten static void _mysqlnd_efree(void *ptr MYSQLND_MEM_D) { size_t free_amount = 0; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_efree_name); #if PHP_DEBUG @@ -223,10 +223,10 @@ static void _mysqlnd_efree(void *ptr MYSQLND_MEM_D) /* {{{ _mysqlnd_pefree */ -static void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D) +static void _mysqlnd_pefree(void *ptr, bool persistent MYSQLND_MEM_D) { size_t free_amount = 0; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_pefree_name); #if PHP_DEBUG @@ -255,10 +255,10 @@ static void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D) /* {{{ _mysqlnd_pememdup */ -static char * _mysqlnd_pememdup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D) +static char * _mysqlnd_pememdup(const char * const ptr, size_t length, bool persistent MYSQLND_MEM_D) { char * ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_pememdup_name); #if PHP_DEBUG @@ -286,10 +286,10 @@ static char * _mysqlnd_pememdup(const char * const ptr, size_t length, zend_bool /* {{{ _mysqlnd_pestrndup */ -static char * _mysqlnd_pestrndup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D) +static char * _mysqlnd_pestrndup(const char * const ptr, size_t length, bool persistent MYSQLND_MEM_D) { char * ret; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_pestrndup_name); #if PHP_DEBUG @@ -327,12 +327,12 @@ static char * _mysqlnd_pestrndup(const char * const ptr, size_t length, zend_boo /* {{{ _mysqlnd_pestrdup */ -static char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D) +static char * _mysqlnd_pestrdup(const char * const ptr, bool persistent MYSQLND_MEM_D) { char * ret; smart_str tmp_str = {0, 0}; const char * p = ptr; - zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); TRACE_ALLOC_ENTER(mysqlnd_pestrdup_name); #if PHP_DEBUG { @@ -403,7 +403,7 @@ static void * mysqlnd_zend_mm_emalloc(size_t size MYSQLND_MEM_D) /* {{{ mysqlnd_zend_mm_pemalloc */ -static void * mysqlnd_zend_mm_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D) +static void * mysqlnd_zend_mm_pemalloc(size_t size, bool persistent MYSQLND_MEM_D) { return pemalloc_rel(size, persistent); } @@ -419,7 +419,7 @@ static void * mysqlnd_zend_mm_ecalloc(unsigned int nmemb, size_t size MYSQLND_ME /* {{{ mysqlnd_zend_mm_pecalloc */ -static void * mysqlnd_zend_mm_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D) +static void * mysqlnd_zend_mm_pecalloc(unsigned int nmemb, size_t size, bool persistent MYSQLND_MEM_D) { return pecalloc_rel(nmemb, size, persistent); } @@ -435,7 +435,7 @@ static void * mysqlnd_zend_mm_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) /* {{{ mysqlnd_zend_mm_perealloc */ -static void * mysqlnd_zend_mm_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D) +static void * mysqlnd_zend_mm_perealloc(void *ptr, size_t new_size, bool persistent MYSQLND_MEM_D) { return perealloc_rel(ptr, new_size, persistent); } @@ -451,7 +451,7 @@ static void mysqlnd_zend_mm_efree(void * ptr MYSQLND_MEM_D) /* {{{ mysqlnd_zend_mm_pefree */ -static void mysqlnd_zend_mm_pefree(void * ptr, zend_bool persistent MYSQLND_MEM_D) +static void mysqlnd_zend_mm_pefree(void * ptr, bool persistent MYSQLND_MEM_D) { pefree_rel(ptr, persistent); } @@ -459,7 +459,7 @@ static void mysqlnd_zend_mm_pefree(void * ptr, zend_bool persistent MYSQLND_MEM_ /* {{{ mysqlnd_zend_mm_pememdup */ -static char * mysqlnd_zend_mm_pememdup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D) +static char * mysqlnd_zend_mm_pememdup(const char * const ptr, size_t length, bool persistent MYSQLND_MEM_D) { char * dest = pemalloc_rel(length, persistent); if (dest) { @@ -471,7 +471,7 @@ static char * mysqlnd_zend_mm_pememdup(const char * const ptr, size_t length, ze /* {{{ mysqlnd_zend_mm_pestrndup */ -static char * mysqlnd_zend_mm_pestrndup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D) +static char * mysqlnd_zend_mm_pestrndup(const char * const ptr, size_t length, bool persistent MYSQLND_MEM_D) { return persistent? zend_strndup(ptr, length ) : estrndup_rel(ptr, length); } @@ -479,7 +479,7 @@ static char * mysqlnd_zend_mm_pestrndup(const char * const ptr, size_t length, z /* {{{ mysqlnd_zend_mm_pestrdup */ -static char * mysqlnd_zend_mm_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D) +static char * mysqlnd_zend_mm_pestrdup(const char * const ptr, bool persistent MYSQLND_MEM_D) { return pestrdup_rel(ptr, persistent); } diff --git a/ext/mysqlnd/mysqlnd_alloc.h b/ext/mysqlnd/mysqlnd_alloc.h index a84b49a995..5ced16abeb 100644 --- a/ext/mysqlnd/mysqlnd_alloc.h +++ b/ext/mysqlnd/mysqlnd_alloc.h @@ -26,16 +26,16 @@ PHPAPI extern const char * mysqlnd_debug_std_no_trace_funcs[]; struct st_mysqlnd_allocator_methods { void * (*m_emalloc)(size_t size MYSQLND_MEM_D); - void * (*m_pemalloc)(size_t size, zend_bool persistent MYSQLND_MEM_D); + void * (*m_pemalloc)(size_t size, bool persistent MYSQLND_MEM_D); void * (*m_ecalloc)(unsigned int nmemb, size_t size MYSQLND_MEM_D); - void * (*m_pecalloc)(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D); + void * (*m_pecalloc)(unsigned int nmemb, size_t size, bool persistent MYSQLND_MEM_D); void * (*m_erealloc)(void *ptr, size_t new_size MYSQLND_MEM_D); - void * (*m_perealloc)(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D); + void * (*m_perealloc)(void *ptr, size_t new_size, bool persistent MYSQLND_MEM_D); void (*m_efree)(void *ptr MYSQLND_MEM_D); - void (*m_pefree)(void *ptr, zend_bool persistent MYSQLND_MEM_D); - char * (*m_pememdup)(const char * const ptr, size_t size, zend_bool persistent MYSQLND_MEM_D); - char * (*m_pestrndup)(const char * const ptr, size_t size, zend_bool persistent MYSQLND_MEM_D); - char * (*m_pestrdup)(const char * const ptr, zend_bool persistent MYSQLND_MEM_D); + void (*m_pefree)(void *ptr, bool persistent MYSQLND_MEM_D); + char * (*m_pememdup)(const char * const ptr, size_t size, bool persistent MYSQLND_MEM_D); + char * (*m_pestrndup)(const char * const ptr, size_t size, bool persistent MYSQLND_MEM_D); + char * (*m_pestrdup)(const char * const ptr, bool persistent MYSQLND_MEM_D); int (*m_sprintf)(char **pbuf, size_t max_len, const char *format, ...); int (*m_vsprintf)(char **pbuf, size_t max_len, const char *format, va_list ap); void (*m_sprintf_free)(char * p); @@ -58,7 +58,7 @@ PHPAPI extern struct st_mysqlnd_allocator_methods mysqlnd_allocator; #define mnd_vsprintf(p, mx_len, fmt,ap) mysqlnd_allocator.m_vsprintf((p), (mx_len), (fmt), (ap)) #define mnd_sprintf_free(p) mysqlnd_allocator.m_sprintf_free((p)) -static inline MYSQLND_STRING mnd_dup_cstring(const MYSQLND_CSTRING str, const zend_bool persistent) +static inline MYSQLND_STRING mnd_dup_cstring(const MYSQLND_CSTRING str, const bool persistent) { const MYSQLND_STRING ret = {(char*) mnd_pemalloc(str.l + 1, persistent), str.l}; if (ret.s) { diff --git a/ext/mysqlnd/mysqlnd_auth.c b/ext/mysqlnd/mysqlnd_auth.c index 057c0a6a82..ce2fa63d6e 100644 --- a/ext/mysqlnd/mysqlnd_auth.c +++ b/ext/mysqlnd/mysqlnd_auth.c @@ -45,12 +45,12 @@ mysqlnd_run_authentication( const unsigned int charset_no, const MYSQLND_SESSION_OPTIONS * const session_options, const zend_ulong mysql_flags, - const zend_bool silent, - const zend_bool is_change_user + const bool silent, + const bool is_change_user ) { enum_func_status ret = FAIL; - zend_bool first_call = TRUE; + bool first_call = TRUE; char * switch_to_auth_protocol = NULL; size_t switch_to_auth_protocol_len = 0; @@ -242,7 +242,7 @@ mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn, const MYSQLND_SESSION_OPTIONS * const session_options, const zend_ulong mysql_flags, const unsigned int server_charset_no, - const zend_bool use_full_blown_auth_packet, + const bool use_full_blown_auth_packet, const char * const auth_protocol, struct st_mysqlnd_authentication_plugin * auth_plugin, const zend_uchar * const orig_auth_plugin_data, @@ -371,8 +371,8 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn, const size_t passwd_len, const char * const db, const size_t db_len, - const zend_bool silent, - const zend_bool use_full_blown_auth_packet, + const bool silent, + const bool use_full_blown_auth_packet, const char * const auth_protocol, struct st_mysqlnd_authentication_plugin * auth_plugin, const zend_uchar * const orig_auth_plugin_data, diff --git a/ext/mysqlnd/mysqlnd_auth.h b/ext/mysqlnd/mysqlnd_auth.h index be51294e92..0cb555cfb5 100644 --- a/ext/mysqlnd/mysqlnd_auth.h +++ b/ext/mysqlnd/mysqlnd_auth.h @@ -27,7 +27,7 @@ mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn, const MYSQLND_SESSION_OPTIONS * const session_options, const zend_ulong mysql_flags, const unsigned int server_charset_no, - const zend_bool use_full_blown_auth_packet, + const bool use_full_blown_auth_packet, const char * const auth_protocol, struct st_mysqlnd_authentication_plugin * auth_plugin, const zend_uchar * const orig_auth_plugin_data, @@ -48,8 +48,8 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn, const size_t passwd_len, const char * const db, const size_t db_len, - const zend_bool silent, - const zend_bool use_full_blown_auth_packet, + const bool silent, + const bool use_full_blown_auth_packet, const char * const auth_protocol, struct st_mysqlnd_authentication_plugin * auth_plugin, const zend_uchar * const orig_auth_plugin_data, @@ -92,8 +92,8 @@ mysqlnd_run_authentication( const unsigned int charset_no, const MYSQLND_SESSION_OPTIONS * const session_options, const zend_ulong mysql_flags, - const zend_bool silent, - const zend_bool is_change_user + const bool silent, + const bool is_change_user ); PHPAPI void php_mysqlnd_scramble(zend_uchar * const buffer, const zend_uchar * const scramble, const zend_uchar * const pass, const size_t pass_len); diff --git a/ext/mysqlnd/mysqlnd_charset.c b/ext/mysqlnd/mysqlnd_charset.c index 48bef05e49..5cf4e6a099 100644 --- a/ext/mysqlnd/mysqlnd_charset.c +++ b/ext/mysqlnd/mysqlnd_charset.c @@ -777,7 +777,7 @@ PHPAPI zend_ulong mysqlnd_cset_escape_quotes(const MYSQLND_CHARSET * const cset, const char *newstr_s = newstr; const char *newstr_e = newstr + 2 * escapestr_len; const char *end = escapestr + escapestr_len; - zend_bool escape_overflow = FALSE; + bool escape_overflow = FALSE; DBG_ENTER("mysqlnd_cset_escape_quotes"); @@ -831,7 +831,7 @@ PHPAPI zend_ulong mysqlnd_cset_escape_slashes(const MYSQLND_CHARSET * const cset const char *newstr_s = newstr; const char *newstr_e = newstr + 2 * escapestr_len; const char *end = escapestr + escapestr_len; - zend_bool escape_overflow = FALSE; + bool escape_overflow = FALSE; DBG_ENTER("mysqlnd_cset_escape_slashes"); DBG_INF_FMT("charset=%s", cset->name); diff --git a/ext/mysqlnd/mysqlnd_commands.c b/ext/mysqlnd/mysqlnd_commands.c index 15beda9a6f..c5ca7a763e 100644 --- a/ext/mysqlnd/mysqlnd_commands.c +++ b/ext/mysqlnd/mysqlnd_commands.c @@ -187,7 +187,7 @@ MYSQLND_METHOD(mysqlnd_command, statistics)(MYSQLND_CONN_DATA * const conn, zend /* {{{ mysqlnd_command::process_kill */ static enum_func_status -MYSQLND_METHOD(mysqlnd_command, process_kill)(MYSQLND_CONN_DATA * const conn, const unsigned int process_id, const zend_bool read_response) +MYSQLND_METHOD(mysqlnd_command, process_kill)(MYSQLND_CONN_DATA * const conn, const unsigned int process_id, const bool read_response) { const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command; const func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_factory->m.send_command_handle_response; @@ -333,7 +333,7 @@ MYSQLND_METHOD(mysqlnd_command, query)(MYSQLND_CONN_DATA * const conn, MYSQLND_C /* {{{ mysqlnd_command::change_user */ static enum_func_status -MYSQLND_METHOD(mysqlnd_command, change_user)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING payload, const zend_bool silent) +MYSQLND_METHOD(mysqlnd_command, change_user)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING payload, const bool silent) { const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command; enum_func_status ret = FAIL; @@ -558,7 +558,7 @@ MYSQLND_METHOD(mysqlnd_command, enable_ssl)(MYSQLND_CONN_DATA * const conn, cons #ifdef MYSQLND_SSL_SUPPORTED if (client_capabilities & CLIENT_SSL) { - const zend_bool server_has_ssl = (server_capabilities & CLIENT_SSL)? TRUE:FALSE; + const bool server_has_ssl = (server_capabilities & CLIENT_SSL)? TRUE:FALSE; if (server_has_ssl == FALSE) { goto close_conn; } else { diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c index 1134eb99b5..168e161d1b 100644 --- a/ext/mysqlnd/mysqlnd_connection.c +++ b/ext/mysqlnd/mysqlnd_connection.c @@ -147,7 +147,7 @@ MYSQLND_CLASS_METHODS_END; /* {{{ mysqlnd_error_info_init */ PHPAPI void -mysqlnd_error_info_init(MYSQLND_ERROR_INFO * const info, const zend_bool persistent) +mysqlnd_error_info_init(MYSQLND_ERROR_INFO * const info, const bool persistent) { DBG_ENTER("mysqlnd_error_info_init"); info->m = mysqlnd_error_info_get_methods(); @@ -219,7 +219,7 @@ mysqlnd_connection_state_init(struct st_mysqlnd_connection_state * const state) static void MYSQLND_METHOD(mysqlnd_conn_data, free_options)(MYSQLND_CONN_DATA * conn) { - zend_bool pers = conn->persistent; + bool pers = conn->persistent; if (conn->options->charset_name) { mnd_pefree(conn->options->charset_name, pers); @@ -259,7 +259,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, free_options)(MYSQLND_CONN_DATA * conn) static void MYSQLND_METHOD(mysqlnd_conn_data, free_contents)(MYSQLND_CONN_DATA * conn) { - zend_bool pers = conn->persistent; + bool pers = conn->persistent; DBG_ENTER("mysqlnd_conn_data::free_contents"); @@ -544,7 +544,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect_handshake)(MYSQLND_CONN_DATA * conn, /* {{{ mysqlnd_conn_data::get_scheme */ static MYSQLND_STRING -MYSQLND_METHOD(mysqlnd_conn_data, get_scheme)(MYSQLND_CONN_DATA * conn, MYSQLND_CSTRING hostname, MYSQLND_CSTRING *socket_or_pipe, unsigned int port, zend_bool * unix_socket, zend_bool * named_pipe) +MYSQLND_METHOD(mysqlnd_conn_data, get_scheme)(MYSQLND_CONN_DATA * conn, MYSQLND_CSTRING hostname, MYSQLND_CSTRING *socket_or_pipe, unsigned int port, bool * unix_socket, bool * named_pipe) { MYSQLND_STRING transport; DBG_ENTER("mysqlnd_conn_data::get_scheme"); @@ -592,11 +592,11 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn, ) { const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), connect); - zend_bool unix_socket = FALSE; - zend_bool named_pipe = FALSE; - zend_bool reconnect = FALSE; - zend_bool saved_compression = FALSE; - zend_bool local_tx_started = FALSE; + bool unix_socket = FALSE; + bool named_pipe = FALSE; + bool reconnect = FALSE; + bool saved_compression = FALSE; + bool local_tx_started = FALSE; MYSQLND_PFC * pfc = conn->protocol_frame_codec; MYSQLND_STRING transport = { NULL, 0 }; @@ -1441,7 +1441,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, get_server_version)(const MYSQLND_CONN_DATA * /* {{{ mysqlnd_conn_data::more_results */ -static zend_bool +static bool MYSQLND_METHOD(mysqlnd_conn_data, more_results)(const MYSQLND_CONN_DATA * const conn) { DBG_ENTER("mysqlnd_conn_data::more_results"); @@ -1559,7 +1559,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, change_user)(MYSQLND_CONN_DATA * const conn, const char * user, const char * passwd, const char * db, - zend_bool silent, + bool silent, size_t passwd_len ) { @@ -1977,7 +1977,7 @@ mysqlnd_escape_string_for_tx_name_in_comment(const char * const name) char * ret = NULL; DBG_ENTER("mysqlnd_escape_string_for_tx_name_in_comment"); if (name) { - zend_bool warned = FALSE; + bool warned = FALSE; const char * p_orig = name; char * p_copy; p_copy = ret = mnd_emalloc(strlen(name) + 1 + 2 + 2 + 1); /* space, open, close, NullS */ @@ -2015,7 +2015,7 @@ mysqlnd_escape_string_for_tx_name_in_comment(const char * const name) /* {{{ mysqlnd_conn_data::tx_commit_ex */ static enum_func_status -MYSQLND_METHOD(mysqlnd_conn_data, tx_commit_or_rollback)(MYSQLND_CONN_DATA * conn, const zend_bool commit, const unsigned int flags, const char * const name) +MYSQLND_METHOD(mysqlnd_conn_data, tx_commit_or_rollback)(MYSQLND_CONN_DATA * conn, const bool commit, const unsigned int flags, const char * const name) { const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), tx_commit_or_rollback); enum_func_status ret = FAIL; @@ -2485,7 +2485,7 @@ mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds) php_socket_t this_fd; php_stream *stream = NULL; unsigned int ret = 0; - zend_bool disproportion = FALSE; + bool disproportion = FALSE; MYSQLND **fwd = conn_array, **bckwd = conn_array; DBG_ENTER("mysqlnd_stream_array_from_fd_set"); @@ -2612,7 +2612,7 @@ PHPAPI MYSQLND * mysqlnd_connection_connect(MYSQLND * conn_handle, ) { enum_func_status ret = FAIL; - zend_bool self_alloced = FALSE; + bool self_alloced = FALSE; MYSQLND_CSTRING hostname = { host, host? strlen(host) : 0 }; MYSQLND_CSTRING username = { user, user? strlen(user) : 0 }; MYSQLND_CSTRING password = { passwd, passwd_len }; @@ -2649,7 +2649,7 @@ PHPAPI MYSQLND * mysqlnd_connection_connect(MYSQLND * conn_handle, /* {{{ mysqlnd_connection_init */ PHPAPI MYSQLND * -mysqlnd_connection_init(const size_t client_flags, const zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory) +mysqlnd_connection_init(const size_t client_flags, const bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory) { MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory = object_factory? object_factory : &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory); MYSQLND * ret; diff --git a/ext/mysqlnd/mysqlnd_connection.h b/ext/mysqlnd/mysqlnd_connection.h index 412913e6a7..a9f3cbd685 100644 --- a/ext/mysqlnd/mysqlnd_connection.h +++ b/ext/mysqlnd/mysqlnd_connection.h @@ -65,7 +65,7 @@ void mysqlnd_upsert_status_init(MYSQLND_UPSERT_STATUS * const upsert_status); } -PHPAPI void mysqlnd_error_info_init(MYSQLND_ERROR_INFO * const info, const zend_bool persistent); +PHPAPI void mysqlnd_error_info_init(MYSQLND_ERROR_INFO * const info, const bool persistent); PHPAPI void mysqlnd_error_info_free_contents(MYSQLND_ERROR_INFO * const info); #define GET_CONNECTION_STATE(state_struct) (state_struct)->m->get((state_struct)) diff --git a/ext/mysqlnd/mysqlnd_debug.c b/ext/mysqlnd/mysqlnd_debug.c index 55590f45c9..edc3c250b5 100644 --- a/ext/mysqlnd/mysqlnd_debug.c +++ b/ext/mysqlnd/mysqlnd_debug.c @@ -26,7 +26,7 @@ static const char * const mysqlnd_debug_empty_string = ""; /* {{{ mysqlnd_debug::open */ static enum_func_status -MYSQLND_METHOD(mysqlnd_debug, open)(MYSQLND_DEBUG * self, zend_bool reopen) +MYSQLND_METHOD(mysqlnd_debug, open)(MYSQLND_DEBUG * self, bool reopen) { if (!self->file_name) { return FAIL; @@ -239,7 +239,7 @@ MYSQLND_METHOD(mysqlnd_debug, log_va)(MYSQLND_DEBUG *self, /* FALSE - The DBG_ calls won't be traced, TRUE - will be traced */ /* {{{ mysqlnd_debug::func_enter */ -static zend_bool +static bool MYSQLND_METHOD(mysqlnd_debug, func_enter)(MYSQLND_DEBUG * self, unsigned int line, const char * const file, const char * const func_name, unsigned int func_name_len) @@ -313,7 +313,7 @@ MYSQLND_METHOD(mysqlnd_debug, func_leave)(MYSQLND_DEBUG * self, unsigned int lin char **func_name; uint64_t * parent_non_own_time_ptr = NULL, * mine_non_own_time_ptr = NULL; uint64_t mine_non_own_time = 0; - zend_bool profile_calls = self->flags & MYSQLND_DEBUG_PROFILE_CALLS? TRUE:FALSE; + bool profile_calls = self->flags & MYSQLND_DEBUG_PROFILE_CALLS? TRUE:FALSE; if ((self->flags & MYSQLND_DEBUG_DUMP_TRACE) == 0 || self->file_name == NULL) { return PASS; diff --git a/ext/mysqlnd/mysqlnd_debug.h b/ext/mysqlnd/mysqlnd_debug.h index 79d53ad700..7c9b57bc0c 100644 --- a/ext/mysqlnd/mysqlnd_debug.h +++ b/ext/mysqlnd/mysqlnd_debug.h @@ -23,13 +23,13 @@ struct st_mysqlnd_debug_methods { - enum_func_status (*open)(MYSQLND_DEBUG * self, zend_bool reopen); + enum_func_status (*open)(MYSQLND_DEBUG * self, bool reopen); void (*set_mode)(MYSQLND_DEBUG * self, const char * const mode); enum_func_status (*log)(MYSQLND_DEBUG * self, unsigned int line, const char * const file, unsigned int level, const char * type, const char *message); enum_func_status (*log_va)(MYSQLND_DEBUG * self, unsigned int line, const char * const file, unsigned int level, const char * type, const char *format, ...); - zend_bool (*func_enter)(MYSQLND_DEBUG * self, unsigned int line, const char * const file, + bool (*func_enter)(MYSQLND_DEBUG * self, unsigned int line, const char * const file, const char * const func_name, unsigned int func_name_len); enum_func_status (*func_leave)(MYSQLND_DEBUG * self, unsigned int line, const char * const file, uint64_t call_time); enum_func_status (*close)(MYSQLND_DEBUG * self); @@ -117,7 +117,7 @@ PHPAPI MYSQLND_DEBUG * mysqlnd_debug_init(const char * skip_functions[]); #define DBG_ENTER_EX2(dbg_obj1, dbg_obj2, func_name) \ struct timeval __dbg_prof_tp = {0}; \ uint64_t __dbg_prof_start = 0; /* initialization is needed */ \ - zend_bool dbg_skip_trace = TRUE; \ + bool dbg_skip_trace = TRUE; \ ((void)__dbg_prof_start); \ if ((dbg_obj1)) { \ dbg_skip_trace = !(dbg_obj1)->m->func_enter((dbg_obj1), __LINE__, __FILE__, func_name, strlen(func_name)); \ diff --git a/ext/mysqlnd/mysqlnd_driver.c b/ext/mysqlnd/mysqlnd_driver.c index d5e2dc7cd6..d553a98ce9 100644 --- a/ext/mysqlnd/mysqlnd_driver.c +++ b/ext/mysqlnd/mysqlnd_driver.c @@ -29,7 +29,7 @@ #include "mysqlnd_reverse_api.h" #include "mysqlnd_ext_plugin.h" -static zend_bool mysqlnd_library_initted = FALSE; +static bool mysqlnd_library_initted = FALSE; static struct st_mysqlnd_plugin_core mysqlnd_plugin_core = { @@ -94,7 +94,7 @@ PHPAPI void mysqlnd_library_init(void) /* {{{ mysqlnd_object_factory::get_connection */ static MYSQLND * -MYSQLND_METHOD(mysqlnd_object_factory, get_connection)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory, const zend_bool persistent) +MYSQLND_METHOD(mysqlnd_object_factory, get_connection)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory, const bool persistent) { const size_t alloc_size_ret = sizeof(MYSQLND) + mysqlnd_plugin_count() * sizeof(void *); const size_t alloc_size_ret_data = sizeof(MYSQLND_CONN_DATA) + mysqlnd_plugin_count() * sizeof(void *); @@ -217,7 +217,7 @@ MYSQLND_METHOD(mysqlnd_object_factory, get_prepared_statement)(MYSQLND_CONN_DATA /* {{{ mysqlnd_object_factory::get_pfc */ static MYSQLND_PFC * -MYSQLND_METHOD(mysqlnd_object_factory, get_pfc)(const zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) +MYSQLND_METHOD(mysqlnd_object_factory, get_pfc)(const bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) { const size_t pfc_alloc_size = ZEND_MM_ALIGNED_SIZE(sizeof(MYSQLND_PFC) + mysqlnd_plugin_count() * sizeof(void *)); const size_t pfc_data_alloc_size = sizeof(MYSQLND_PFC_DATA) + mysqlnd_plugin_count() * sizeof(void *); @@ -242,7 +242,7 @@ MYSQLND_METHOD(mysqlnd_object_factory, get_pfc)(const zend_bool persistent, MYSQ /* {{{ mysqlnd_object_factory::get_vio */ static MYSQLND_VIO * -MYSQLND_METHOD(mysqlnd_object_factory, get_vio)(const zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) +MYSQLND_METHOD(mysqlnd_object_factory, get_vio)(const bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) { const size_t vio_alloc_size = ZEND_MM_ALIGNED_SIZE(sizeof(MYSQLND_VIO) + mysqlnd_plugin_count() * sizeof(void *)); const size_t vio_data_alloc_size = sizeof(MYSQLND_VIO_DATA) + mysqlnd_plugin_count() * sizeof(void *); @@ -267,7 +267,7 @@ MYSQLND_METHOD(mysqlnd_object_factory, get_vio)(const zend_bool persistent, MYSQ /* {{{ mysqlnd_object_factory::get_protocol_payload_decoder_factory */ static MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * -MYSQLND_METHOD(mysqlnd_object_factory, get_protocol_payload_decoder_factory)(MYSQLND_CONN_DATA * conn, const zend_bool persistent) +MYSQLND_METHOD(mysqlnd_object_factory, get_protocol_payload_decoder_factory)(MYSQLND_CONN_DATA * conn, const bool persistent) { const size_t alloc_size = sizeof(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY) + mysqlnd_plugin_count() * sizeof(void *); MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY *ret = mnd_pecalloc(1, alloc_size, persistent); diff --git a/ext/mysqlnd/mysqlnd_libmysql_compat.h b/ext/mysqlnd/mysqlnd_libmysql_compat.h index 092659e9dd..93d229281f 100644 --- a/ext/mysqlnd/mysqlnd_libmysql_compat.h +++ b/ext/mysqlnd/mysqlnd_libmysql_compat.h @@ -26,7 +26,7 @@ #define MYSQL_RES MYSQLND_RES #define MYSQL_ROW MYSQLND_ROW_C #define MYSQL MYSQLND -#define my_bool zend_bool +#define my_bool bool #define my_ulonglong uint64_t #define MYSQL_VERSION_ID MYSQLND_VERSION_ID diff --git a/ext/mysqlnd/mysqlnd_loaddata.c b/ext/mysqlnd/mysqlnd_loaddata.c index 677378f5cd..4cd0433877 100644 --- a/ext/mysqlnd/mysqlnd_loaddata.c +++ b/ext/mysqlnd/mysqlnd_loaddata.c @@ -137,7 +137,7 @@ static const char *lost_conn = "Lost connection to MySQL server during LOAD DATA /* {{{ mysqlnd_handle_local_infile */ enum_func_status -mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * const filename, zend_bool * is_warning) +mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * const filename, bool * is_warning) { zend_uchar *buf = NULL; zend_uchar empty_packet[MYSQLND_HEADER_SIZE]; diff --git a/ext/mysqlnd/mysqlnd_priv.h b/ext/mysqlnd/mysqlnd_priv.h index d0b97eb16e..c19bc10723 100644 --- a/ext/mysqlnd/mysqlnd_priv.h +++ b/ext/mysqlnd/mysqlnd_priv.h @@ -30,5 +30,5 @@ PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_upsert_status); PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_error_info); PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_command); -enum_func_status mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * const filename, zend_bool * is_warning); +enum_func_status mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * const filename, bool * is_warning); #endif /* MYSQLND_PRIV_H */ diff --git a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c index ddceaa7f5b..f16ce7bf9d 100644 --- a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c +++ b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c @@ -387,7 +387,7 @@ MYSQLND_METHOD(mysqlnd_pfc, set_client_option)(MYSQLND_PFC * const pfc, enum_mys pfc->data->flags |= MYSQLND_PROTOCOL_FLAG_USE_COMPRESSION; break; case MYSQL_SERVER_PUBLIC_KEY: { - const zend_bool pers = pfc->persistent; + const bool pers = pfc->persistent; if (pfc->data->sha256_server_public_key) { mnd_pefree(pfc->data->sha256_server_public_key, pers); } @@ -498,7 +498,7 @@ MYSQLND_CLASS_METHODS_END; /* {{{ mysqlnd_pfc_init */ PHPAPI MYSQLND_PFC * -mysqlnd_pfc_init(const zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) +mysqlnd_pfc_init(const bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) { MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory = object_factory? object_factory : &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory); MYSQLND_PFC * pfc; diff --git a/ext/mysqlnd/mysqlnd_protocol_frame_codec.h b/ext/mysqlnd/mysqlnd_protocol_frame_codec.h index 8ba317f0e2..1aa6d703d9 100644 --- a/ext/mysqlnd/mysqlnd_protocol_frame_codec.h +++ b/ext/mysqlnd/mysqlnd_protocol_frame_codec.h @@ -18,7 +18,7 @@ #ifndef MYSQLND_PROTOCOL_FRAME_CODEC_H #define MYSQLND_PROTOCOL_FRAME_CODEC_H -PHPAPI MYSQLND_PFC * mysqlnd_pfc_init(const zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); +PHPAPI MYSQLND_PFC * mysqlnd_pfc_init(const bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); PHPAPI void mysqlnd_pfc_free(MYSQLND_PFC * const pfc, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); #endif /* MYSQLND_PROTOCOL_FRAME_CODEC_H */ diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c index da42091d34..512ca9b9ef 100644 --- a/ext/mysqlnd/mysqlnd_ps.c +++ b/ext/mysqlnd/mysqlnd_ps.c @@ -32,8 +32,8 @@ const char * const mysqlnd_not_bound_as_blob = "Can't send long data for non-str const char * const mysqlnd_stmt_not_prepared = "Statement not prepared"; /* Exported by mysqlnd_ps_codec.c */ -enum_func_status mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer); -enum_func_status mysqlnd_stmt_execute_batch_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer); +enum_func_status mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, bool * free_buffer); +enum_func_status mysqlnd_stmt_execute_batch_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, bool * free_buffer); static void mysqlnd_stmt_separate_result_bind(MYSQLND_STMT * const stmt); @@ -54,7 +54,7 @@ static enum_func_status mysqlnd_stmt_send_cursor_fetch_command( return PASS; } -static zend_bool mysqlnd_stmt_check_state(const MYSQLND_STMT_DATA *stmt) +static bool mysqlnd_stmt_check_state(const MYSQLND_STMT_DATA *stmt) { const MYSQLND_CONN_DATA *conn = stmt->conn; if (stmt->state != MYSQLND_STMT_WAITING_USE_OR_STORE) { @@ -207,7 +207,7 @@ MYSQLND_METHOD(mysqlnd_stmt, get_result)(MYSQLND_STMT * const s) /* {{{ mysqlnd_stmt::more_results */ -static zend_bool +static bool MYSQLND_METHOD(mysqlnd_stmt, more_results)(const MYSQLND_STMT * s) { MYSQLND_STMT_DATA * stmt = s? s->data : NULL; @@ -653,7 +653,7 @@ MYSQLND_METHOD(mysqlnd_stmt, send_execute)(MYSQLND_STMT * const s, const enum_my enum_func_status ret; zend_uchar *request = NULL; size_t request_len; - zend_bool free_request; + bool free_request; DBG_ENTER("mysqlnd_stmt::send_execute"); if (!stmt || !conn) { @@ -770,7 +770,7 @@ MYSQLND_METHOD(mysqlnd_stmt, use_result)(MYSQLND_STMT * s) /* {{{ mysqlnd_fetch_row_cursor */ enum_func_status -mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, zval **row_ptr, const unsigned int flags, zend_bool * fetched_anything) +mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, zval **row_ptr, const unsigned int flags, bool * fetched_anything) { enum_func_status ret; MYSQLND_STMT_DATA * stmt = result->unbuf->stmt; @@ -865,7 +865,7 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, zval **row_ptr, const unsign /* {{{ mysqlnd_stmt::fetch */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const s, zend_bool * const fetched_anything) +MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const s, bool * const fetched_anything) { MYSQLND_STMT_DATA * stmt = s? s->data : NULL; MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL; @@ -1616,7 +1616,7 @@ MYSQLND_METHOD(mysqlnd_stmt, attr_get)(const MYSQLND_STMT * const s, switch (attr_type) { case STMT_ATTR_UPDATE_MAX_LENGTH: - *(zend_bool *) value= stmt->update_max_length; + *(bool *) value= stmt->update_max_length; break; case STMT_ATTR_CURSOR_TYPE: *(unsigned long *) value= stmt->flags; @@ -1790,7 +1790,7 @@ MYSQLND_METHOD(mysqlnd_stmt, free_stmt_content)(MYSQLND_STMT * const s) /* {{{ mysqlnd_stmt::close_on_server */ static enum_func_status -MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, close_on_server)(MYSQLND_STMT * const s, zend_bool implicit) +MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, close_on_server)(MYSQLND_STMT * const s, bool implicit) { MYSQLND_STMT_DATA * stmt = s? s->data : NULL; MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL; @@ -1874,7 +1874,7 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, close_on_server)(MYSQLND_STMT * const s, ze /* {{{ mysqlnd_stmt::dtor */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, dtor)(MYSQLND_STMT * const s, zend_bool implicit) +MYSQLND_METHOD(mysqlnd_stmt, dtor)(MYSQLND_STMT * const s, bool implicit) { MYSQLND_STMT_DATA * stmt = (s != NULL) ? s->data:NULL; enum_func_status ret = FAIL; diff --git a/ext/mysqlnd/mysqlnd_ps.h b/ext/mysqlnd/mysqlnd_ps.h index 9e10fbab77..f590d4d798 100644 --- a/ext/mysqlnd/mysqlnd_ps.h +++ b/ext/mysqlnd/mysqlnd_ps.h @@ -26,14 +26,14 @@ struct st_mysqlnd_perm_bind { /* should be signed int */ int pack_len; unsigned int php_type; - zend_bool is_possibly_blob; - zend_bool can_ret_as_str_in_uni; + bool is_possibly_blob; + bool can_ret_as_str_in_uni; }; extern struct st_mysqlnd_perm_bind mysqlnd_ps_fetch_functions[MYSQL_TYPE_LAST + 1]; -enum_func_status mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES * result, zval **row_data, const unsigned int flags, zend_bool * fetched_anything); -enum_func_status mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, zval **row_data, const unsigned int flags, zend_bool * fetched_anything); +enum_func_status mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES * result, zval **row_data, const unsigned int flags, bool * fetched_anything); +enum_func_status mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, zval **row_data, const unsigned int flags, bool * fetched_anything); void _mysqlnd_init_ps_subsystem();/* This one is private, mysqlnd_library_init() will call it */ void _mysqlnd_init_ps_fetch_subsystem(); diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index ebe0c5a9d8..e695d6ba79 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -40,7 +40,7 @@ struct st_mysqlnd_time { unsigned int year, month, day, hour, minute, second; zend_ulong second_part; - zend_bool neg; + bool neg; enum mysqlnd_timestamp_type time_type; }; @@ -57,7 +57,7 @@ ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, const u { char tmp[22]; size_t tmp_len = 0; - zend_bool is_bit = field->type == MYSQL_TYPE_BIT; + bool is_bit = field->type == MYSQL_TYPE_BIT; DBG_ENTER("ps_fetch_from_1_to_8_bytes"); DBG_INF_FMT("zv=%p byte_count=%u", zv, byte_count); if (field->flags & UNSIGNED_FLAG) { @@ -219,7 +219,7 @@ ps_fetch_time(zval * zv, const MYSQLND_FIELD * const field, const unsigned int p const zend_uchar * to = *row; t.time_type = MYSQLND_TIMESTAMP_TIME; - t.neg = (zend_bool) to[0]; + t.neg = (bool) to[0]; t.day = (zend_ulong) sint4korr(to+1); t.hour = (unsigned int) to[5]; @@ -905,7 +905,7 @@ end: /* {{{ mysqlnd_stmt_execute_generate_request */ enum_func_status -mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer) +mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, bool * free_buffer) { MYSQLND_STMT_DATA * stmt = s->data; zend_uchar *p = stmt->execute_cmd_buffer.buffer, diff --git a/ext/mysqlnd/mysqlnd_read_buffer.c b/ext/mysqlnd/mysqlnd_read_buffer.c index d2ff02e7ca..e4c761c7de 100644 --- a/ext/mysqlnd/mysqlnd_read_buffer.c +++ b/ext/mysqlnd/mysqlnd_read_buffer.c @@ -22,7 +22,7 @@ /* {{{ mysqlnd_read_buffer_is_empty */ -static zend_bool +static bool mysqlnd_read_buffer_is_empty(const MYSQLND_READ_BUFFER * const buffer) { return buffer->len? FALSE:TRUE; diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c index f7b69749d2..ac8e707757 100644 --- a/ext/mysqlnd/mysqlnd_result.c +++ b/ext/mysqlnd/mysqlnd_result.c @@ -217,7 +217,7 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s) switch (rset_header.field_count) { case MYSQLND_NULL_LENGTH: { /* LOAD DATA LOCAL INFILE */ - zend_bool is_warning; + bool is_warning; DBG_INF("LOAD DATA"); conn->last_query_type = QUERY_LOAD_LOCAL; conn->field_count = 0; /* overwrite previous value, or the last value could be used and lead to bug#53503 */ @@ -407,7 +407,7 @@ MYSQLND_METHOD(mysqlnd_res, fetch_lengths)(const MYSQLND_RES * const result) /* {{{ mysqlnd_result_unbuffered::fetch_row */ static enum_func_status -MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row)(MYSQLND_RES * result, zval **row_ptr, const unsigned int flags, zend_bool * fetched_anything) +MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row)(MYSQLND_RES * result, zval **row_ptr, const unsigned int flags, bool * fetched_anything) { enum_func_status ret; MYSQLND_PACKET_ROW *row_packet = result->unbuf->row_packet; @@ -548,7 +548,7 @@ MYSQLND_METHOD(mysqlnd_res, use_result)(MYSQLND_RES * const result, MYSQLND_STMT /* {{{ mysqlnd_result_buffered::fetch_row */ static enum_func_status -MYSQLND_METHOD(mysqlnd_result_buffered, fetch_row)(MYSQLND_RES * result, zval **row_ptr, const unsigned int flags, zend_bool * fetched_anything) +MYSQLND_METHOD(mysqlnd_result_buffered, fetch_row)(MYSQLND_RES * result, zval **row_ptr, const unsigned int flags, bool * fetched_anything) { MYSQLND_RES_BUFFERED *set = result->stored_data; @@ -601,7 +601,7 @@ MYSQLND_METHOD(mysqlnd_result_buffered, fetch_row)(MYSQLND_RES * result, zval ** /* {{{ mysqlnd_res::fetch_row */ static enum_func_status -MYSQLND_METHOD(mysqlnd_res, fetch_row)(MYSQLND_RES *result, zval **row_ptr, const unsigned int flags, zend_bool *fetched_anything) +MYSQLND_METHOD(mysqlnd_res, fetch_row)(MYSQLND_RES *result, zval **row_ptr, const unsigned int flags, bool *fetched_anything) { const mysqlnd_fetch_row_func f = result->stored_data ? result->stored_data->m.fetch_row : @@ -620,7 +620,7 @@ enum_func_status MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const conn, MYSQLND_RES * result, MYSQLND_RES_METADATA * meta, MYSQLND_ROW_BUFFER **row_buffers, - zend_bool binary_protocol) + bool binary_protocol) { enum_func_status ret; uint64_t total_allocated_rows = 0; @@ -785,7 +785,7 @@ MYSQLND_METHOD(mysqlnd_res, store_result)(MYSQLND_RES * result, static enum_func_status MYSQLND_METHOD(mysqlnd_res, skip_result)(MYSQLND_RES * const result) { - zend_bool fetched_anything; + bool fetched_anything; DBG_ENTER("mysqlnd_res::skip_result"); /* @@ -814,7 +814,7 @@ MYSQLND_METHOD(mysqlnd_res, skip_result)(MYSQLND_RES * const result) /* {{{ mysqlnd_res::free_result */ static enum_func_status -MYSQLND_METHOD(mysqlnd_res, free_result)(MYSQLND_RES * result, const zend_bool implicit) +MYSQLND_METHOD(mysqlnd_res, free_result)(MYSQLND_RES * result, const bool implicit) { DBG_ENTER("mysqlnd_res::free_result"); @@ -966,7 +966,7 @@ static void MYSQLND_METHOD(mysqlnd_res, fetch_into)(MYSQLND_RES * result, const unsigned int flags, zval *return_value ZEND_FILE_LINE_DC) { - zend_bool fetched_anything; + bool fetched_anything; zval *row_data; DBG_ENTER("mysqlnd_res::fetch_into"); @@ -1023,7 +1023,7 @@ MYSQLND_METHOD(mysqlnd_res, fetch_into)(MYSQLND_RES * result, const unsigned int static MYSQLND_ROW_C MYSQLND_METHOD(mysqlnd_res, fetch_row_c)(MYSQLND_RES * result) { - zend_bool fetched_anything; + bool fetched_anything; zval *row_data; MYSQLND_ROW_C ret = NULL; DBG_ENTER("mysqlnd_res::fetch_row_c"); diff --git a/ext/mysqlnd/mysqlnd_statistics.c b/ext/mysqlnd/mysqlnd_statistics.c index 0a34ebc81c..117847a5f3 100644 --- a/ext/mysqlnd/mysqlnd_statistics.c +++ b/ext/mysqlnd/mysqlnd_statistics.c @@ -212,7 +212,7 @@ mysqlnd_fill_stats_hash(const MYSQLND_STATS * const stats, const MYSQLND_STRING /* {{{ mysqlnd_stats_init */ PHPAPI void -mysqlnd_stats_init(MYSQLND_STATS ** stats, const size_t statistic_count, const zend_bool persistent) +mysqlnd_stats_init(MYSQLND_STATS ** stats, const size_t statistic_count, const bool persistent) { *stats = pecalloc(1, sizeof(MYSQLND_STATS), persistent); (*stats)->values = pecalloc(statistic_count, sizeof(uint64_t), persistent); @@ -228,7 +228,7 @@ mysqlnd_stats_init(MYSQLND_STATS ** stats, const size_t statistic_count, const z /* {{{ mysqlnd_stats_end */ PHPAPI void -mysqlnd_stats_end(MYSQLND_STATS * stats, const zend_bool persistent) +mysqlnd_stats_end(MYSQLND_STATS * stats, const bool persistent) { #ifdef ZTS tsrm_mutex_free(stats->LOCK_access); diff --git a/ext/mysqlnd/mysqlnd_statistics.h b/ext/mysqlnd/mysqlnd_statistics.h index 0a6310d716..99e3903492 100644 --- a/ext/mysqlnd/mysqlnd_statistics.h +++ b/ext/mysqlnd/mysqlnd_statistics.h @@ -108,8 +108,8 @@ -PHPAPI void mysqlnd_stats_init(MYSQLND_STATS ** stats, const size_t statistic_count, const zend_bool persistent); -PHPAPI void mysqlnd_stats_end(MYSQLND_STATS * stats, const zend_bool persistent); +PHPAPI void mysqlnd_stats_init(MYSQLND_STATS ** stats, const size_t statistic_count, const bool persistent); +PHPAPI void mysqlnd_stats_end(MYSQLND_STATS * stats, const bool persistent); PHPAPI void mysqlnd_fill_stats_hash(const MYSQLND_STATS * const stats, const MYSQLND_STRING * names, zval *return_value ZEND_FILE_LINE_DC); diff --git a/ext/mysqlnd/mysqlnd_structs.h b/ext/mysqlnd/mysqlnd_structs.h index af2cafc576..75d8af9acd 100644 --- a/ext/mysqlnd/mysqlnd_structs.h +++ b/ext/mysqlnd/mysqlnd_structs.h @@ -79,7 +79,7 @@ typedef struct st_mysqlnd_cmd_buffer typedef struct st_mysqlnd_field { zend_string *sname; /* Name of column */ - zend_bool is_numeric; + bool is_numeric; zend_ulong num_key; const char *name; /* Name of column in C string */ const char *org_name; /* Original column name, if an alias */ @@ -149,7 +149,7 @@ struct st_mysqlnd_error_info unsigned int error_no; zend_llist error_list; - zend_bool persistent; + bool persistent; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) *m; }; @@ -230,7 +230,7 @@ typedef struct st_mysqlnd_session_options /* maximum allowed packet size for communication */ unsigned int max_allowed_packet; - zend_bool int_and_float_native; + bool int_and_float_native; } MYSQLND_SESSION_OPTIONS; @@ -289,7 +289,7 @@ typedef MYSQLND_RES* (*mysqlnd_stmt_use_or_store_func)(MYSQLND_STMT * const); typedef enum_func_status (*mysqlnd_fetch_row_func)(MYSQLND_RES *result, zval **row, const unsigned int flags, - zend_bool * fetched_anything + bool * fetched_anything ); @@ -302,7 +302,7 @@ struct st_mysqlnd_stats uint64_t *values; mysqlnd_stat_trigger *triggers; size_t count; - zend_bool in_trigger; + bool in_trigger; #ifdef ZTS MUTEX_T LOCK_access; #endif @@ -314,12 +314,12 @@ typedef enum_func_status (*func_mysqlnd_execute_com_debug)(MYSQLND_CONN_DATA * c typedef enum_func_status (*func_mysqlnd_execute_com_init_db)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING db); typedef enum_func_status (*func_mysqlnd_execute_com_ping)(MYSQLND_CONN_DATA * const conn); typedef enum_func_status (*func_mysqlnd_execute_com_statistics)(MYSQLND_CONN_DATA * const conn, zend_string ** message); -typedef enum_func_status (*func_mysqlnd_execute_com_process_kill)(MYSQLND_CONN_DATA * const conn, const unsigned int process_id, const zend_bool read_response); +typedef enum_func_status (*func_mysqlnd_execute_com_process_kill)(MYSQLND_CONN_DATA * const conn, const unsigned int process_id, const bool read_response); typedef enum_func_status (*func_mysqlnd_execute_com_refresh)(MYSQLND_CONN_DATA * const conn, const uint8_t options); typedef enum_func_status (*func_mysqlnd_execute_com_shutdown)(MYSQLND_CONN_DATA * const conn, const uint8_t level); typedef enum_func_status (*func_mysqlnd_execute_com_quit)(MYSQLND_CONN_DATA * const conn); typedef enum_func_status (*func_mysqlnd_execute_com_query)(MYSQLND_CONN_DATA * const conn, MYSQLND_CSTRING query); -typedef enum_func_status (*func_mysqlnd_execute_com_change_user)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING payload, const zend_bool silent); +typedef enum_func_status (*func_mysqlnd_execute_com_change_user)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING payload, const bool silent); typedef enum_func_status (*func_mysqlnd_execute_com_reap_result)(MYSQLND_CONN_DATA * const conn); typedef enum_func_status (*func_mysqlnd_execute_com_stmt_prepare)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING query); typedef enum_func_status (*func_mysqlnd_execute_com_stmt_execute)(MYSQLND_CONN_DATA * conn, const MYSQLND_CSTRING payload); @@ -360,13 +360,13 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_command) typedef enum_func_status (*func_mysqlnd_vio__init)(MYSQLND_VIO * const vio, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info); typedef void (*func_mysqlnd_vio__dtor)(MYSQLND_VIO * const vio, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info); -typedef enum_func_status (*func_mysqlnd_vio__connect)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info); +typedef enum_func_status (*func_mysqlnd_vio__connect)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info); typedef void (*func_mysqlnd_vio__close_stream)(MYSQLND_VIO * const vio, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info); -typedef php_stream * (*func_mysqlnd_vio__open_stream)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info); +typedef php_stream * (*func_mysqlnd_vio__open_stream)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info); typedef php_stream * (*func_mysqlnd_vio__get_stream)(const MYSQLND_VIO * const vio); typedef enum_func_status (*func_mysqlnd_vio__set_stream)(MYSQLND_VIO * const vio, php_stream * vio_stream); -typedef zend_bool (*func_mysqlnd_vio__has_valid_stream)(const MYSQLND_VIO * const vio); +typedef bool (*func_mysqlnd_vio__has_valid_stream)(const MYSQLND_VIO * const vio); typedef func_mysqlnd_vio__open_stream (*func_mysqlnd_vio__get_open_stream)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, MYSQLND_ERROR_INFO * const error_info); typedef enum_func_status (*func_mysqlnd_vio__set_client_option)(MYSQLND_VIO * const vio, enum_mysqlnd_client_option option, const char * const value); @@ -414,12 +414,12 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory); -typedef MYSQLND * (*func_mysqlnd_object_factory__get_connection)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) * factory, const zend_bool persistent); +typedef MYSQLND * (*func_mysqlnd_object_factory__get_connection)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) * factory, const bool persistent); typedef MYSQLND * (*func_mysqlnd_object_factory__clone_connection_object)(MYSQLND * conn); typedef MYSQLND_STMT * (*func_mysqlnd_object_factory__get_prepared_statement)(MYSQLND_CONN_DATA * conn); -typedef MYSQLND_PFC * (*func_mysqlnd_object_factory__get_pfc)(const zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); -typedef MYSQLND_VIO * (*func_mysqlnd_object_factory__get_vio)(const zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); -typedef MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * (*func_mysqlnd_object_factory__get_protocol_payload_decoder_factory)(MYSQLND_CONN_DATA * conn, const zend_bool persistent); +typedef MYSQLND_PFC * (*func_mysqlnd_object_factory__get_pfc)(const bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); +typedef MYSQLND_VIO * (*func_mysqlnd_object_factory__get_vio)(const bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); +typedef MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * (*func_mysqlnd_object_factory__get_protocol_payload_decoder_factory)(MYSQLND_CONN_DATA * conn, const bool persistent); MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) @@ -442,7 +442,7 @@ typedef enum_func_status (*func_mysqlnd_conn_data__reap_query)(MYSQLND_CONN_DATA typedef MYSQLND_RES * (*func_mysqlnd_conn_data__use_result)(MYSQLND_CONN_DATA * const conn); typedef MYSQLND_RES * (*func_mysqlnd_conn_data__store_result)(MYSQLND_CONN_DATA * const conn); typedef enum_func_status (*func_mysqlnd_conn_data__next_result)(MYSQLND_CONN_DATA * const conn); -typedef zend_bool (*func_mysqlnd_conn_data__more_results)(const MYSQLND_CONN_DATA * const conn); +typedef bool (*func_mysqlnd_conn_data__more_results)(const MYSQLND_CONN_DATA * const conn); typedef MYSQLND_STMT * (*func_mysqlnd_conn_data__stmt_init)(MYSQLND_CONN_DATA * const conn); @@ -453,7 +453,7 @@ typedef enum_func_status (*func_mysqlnd_conn_data__ping)(MYSQLND_CONN_DATA * con typedef enum_func_status (*func_mysqlnd_conn_data__kill_connection)(MYSQLND_CONN_DATA * conn, unsigned int pid); typedef enum_func_status (*func_mysqlnd_conn_data__select_db)(MYSQLND_CONN_DATA * const conn, const char * const db, const size_t db_len); typedef enum_func_status (*func_mysqlnd_conn_data__server_dump_debug_information)(MYSQLND_CONN_DATA * const conn); -typedef enum_func_status (*func_mysqlnd_conn_data__change_user)(MYSQLND_CONN_DATA * const conn, const char * user, const char * passwd, const char * db, zend_bool silent, size_t passwd_len); +typedef enum_func_status (*func_mysqlnd_conn_data__change_user)(MYSQLND_CONN_DATA * const conn, const char * user, const char * passwd, const char * db, bool silent, size_t passwd_len); typedef unsigned int (*func_mysqlnd_conn_data__get_error_no)(const MYSQLND_CONN_DATA * const conn); typedef const char * (*func_mysqlnd_conn_data__get_error_str)(const MYSQLND_CONN_DATA * const conn); @@ -488,8 +488,8 @@ typedef enum_func_status (*func_mysqlnd_conn_data__query_read_result_set_header) typedef MYSQLND_CONN_DATA * (*func_mysqlnd_conn_data__get_reference)(MYSQLND_CONN_DATA * const conn); typedef enum_func_status (*func_mysqlnd_conn_data__free_reference)(MYSQLND_CONN_DATA * const conn); -typedef enum_func_status (*func_mysqlnd_conn_data__send_command_do_request)(MYSQLND_CONN_DATA * const conn, const enum php_mysqlnd_server_command command, const zend_uchar * const arg, const size_t arg_len, const zend_bool silent, const zend_bool ignore_upsert_status); -typedef enum_func_status (*func_mysqlnd_conn_data__send_command_handle_response)(MYSQLND_CONN_DATA * const conn, const enum mysqlnd_packet_type ok_packet, const zend_bool silent, const enum php_mysqlnd_server_command command, const zend_bool ignore_upsert_status); +typedef enum_func_status (*func_mysqlnd_conn_data__send_command_do_request)(MYSQLND_CONN_DATA * const conn, const enum php_mysqlnd_server_command command, const zend_uchar * const arg, const size_t arg_len, const bool silent, const bool ignore_upsert_status); +typedef enum_func_status (*func_mysqlnd_conn_data__send_command_handle_response)(MYSQLND_CONN_DATA * const conn, const enum mysqlnd_packet_type ok_packet, const bool silent, const enum php_mysqlnd_server_command command, const bool ignore_upsert_status); typedef enum_func_status (*func_mysqlnd_conn_data__restart_psession)(MYSQLND_CONN_DATA * conn); typedef enum_func_status (*func_mysqlnd_conn_data__end_psession)(MYSQLND_CONN_DATA * conn); @@ -503,7 +503,7 @@ typedef enum_func_status (*func_mysqlnd_conn_data__set_autocommit)(MYSQLND_CONN_ typedef enum_func_status (*func_mysqlnd_conn_data__tx_commit)(MYSQLND_CONN_DATA * conn); typedef enum_func_status (*func_mysqlnd_conn_data__tx_rollback)(MYSQLND_CONN_DATA * conn); typedef enum_func_status (*func_mysqlnd_conn_data__tx_begin)(MYSQLND_CONN_DATA * conn, const unsigned int mode, const char * const name); -typedef enum_func_status (*func_mysqlnd_conn_data__tx_commit_or_rollback)(MYSQLND_CONN_DATA * conn, const zend_bool commit, const unsigned int flags, const char * const name); +typedef enum_func_status (*func_mysqlnd_conn_data__tx_commit_or_rollback)(MYSQLND_CONN_DATA * conn, const bool commit, const unsigned int flags, const char * const name); typedef void (*func_mysqlnd_conn_data__tx_cor_options_to_string)(const MYSQLND_CONN_DATA * const conn, smart_str * tmp_str, const unsigned int mode); typedef enum_func_status (*func_mysqlnd_conn_data__tx_savepoint)(MYSQLND_CONN_DATA * conn, const char * const name); typedef enum_func_status (*func_mysqlnd_conn_data__tx_savepoint_release)(MYSQLND_CONN_DATA * conn, const char * const name); @@ -521,7 +521,7 @@ typedef enum_func_status (*func_mysqlnd_conn_data__set_client_option_2d)(MYSQLND typedef size_t (*func_mysqlnd_conn_data__negotiate_client_api_capabilities)(MYSQLND_CONN_DATA * const conn, const size_t flags); typedef size_t (*func_mysqlnd_conn_data__get_client_api_capabilities)(const MYSQLND_CONN_DATA * const conn); -typedef MYSQLND_STRING (*func_mysqlnd_conn_data__get_scheme)(MYSQLND_CONN_DATA * conn, MYSQLND_CSTRING hostname, MYSQLND_CSTRING *socket_or_pipe, unsigned int port, zend_bool * unix_socket, zend_bool * named_pipe); +typedef MYSQLND_STRING (*func_mysqlnd_conn_data__get_scheme)(MYSQLND_CONN_DATA * conn, MYSQLND_CSTRING hostname, MYSQLND_CSTRING *socket_or_pipe, unsigned int port, bool * unix_socket, bool * named_pipe); @@ -633,7 +633,7 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) /* for decoding - binary or text protocol */ typedef enum_func_status (*func_mysqlnd_res__row_decoder)(MYSQLND_ROW_BUFFER * row_buffer, zval * fields, const unsigned int field_count, const MYSQLND_FIELD * const fields_metadata, - const zend_bool as_int_or_float, MYSQLND_STATS * const stats); + const bool as_int_or_float, MYSQLND_STATS * const stats); typedef MYSQLND_RES * (*func_mysqlnd_res__use_result)(MYSQLND_RES * const result, MYSQLND_STMT_DATA *stmt); @@ -652,10 +652,10 @@ typedef const MYSQLND_FIELD *(*func_mysqlnd_res__fetch_fields)(MYSQLND_RES * con typedef enum_func_status (*func_mysqlnd_res__read_result_metadata)(MYSQLND_RES * result, MYSQLND_CONN_DATA * conn); typedef const size_t * (*func_mysqlnd_res__fetch_lengths)(const MYSQLND_RES * const result); -typedef enum_func_status (*func_mysqlnd_res__store_result_fetch_data)(MYSQLND_CONN_DATA * const conn, MYSQLND_RES * result, MYSQLND_RES_METADATA * meta, MYSQLND_ROW_BUFFER ** row_buffers, zend_bool binary_protocol); +typedef enum_func_status (*func_mysqlnd_res__store_result_fetch_data)(MYSQLND_CONN_DATA * const conn, MYSQLND_RES * result, MYSQLND_RES_METADATA * meta, MYSQLND_ROW_BUFFER ** row_buffers, bool binary_protocol); typedef void (*func_mysqlnd_res__free_result_buffers)(MYSQLND_RES * result); /* private */ -typedef enum_func_status (*func_mysqlnd_res__free_result)(MYSQLND_RES * result, const zend_bool implicit); +typedef enum_func_status (*func_mysqlnd_res__free_result)(MYSQLND_RES * result, const bool implicit); typedef void (*func_mysqlnd_res__free_result_contents)(MYSQLND_RES *result); typedef void (*func_mysqlnd_res__free_buffered_data)(MYSQLND_RES *result); @@ -753,14 +753,14 @@ typedef enum_func_status (*func_mysqlnd_stmt__execute)(MYSQLND_STMT * const stmt typedef MYSQLND_RES * (*func_mysqlnd_stmt__use_result)(MYSQLND_STMT * const stmt); typedef MYSQLND_RES * (*func_mysqlnd_stmt__store_result)(MYSQLND_STMT * const stmt); typedef MYSQLND_RES * (*func_mysqlnd_stmt__get_result)(MYSQLND_STMT * const stmt); -typedef zend_bool (*func_mysqlnd_stmt__more_results)(const MYSQLND_STMT * const stmt); +typedef bool (*func_mysqlnd_stmt__more_results)(const MYSQLND_STMT * const stmt); typedef enum_func_status (*func_mysqlnd_stmt__next_result)(MYSQLND_STMT * const stmt); typedef enum_func_status (*func_mysqlnd_stmt__free_result)(MYSQLND_STMT * const stmt); typedef enum_func_status (*func_mysqlnd_stmt__seek_data)(const MYSQLND_STMT * const stmt, uint64_t row); typedef enum_func_status (*func_mysqlnd_stmt__reset)(MYSQLND_STMT * const stmt); -typedef enum_func_status (*func_mysqlnd_stmt__close_on_server)(MYSQLND_STMT * const stmt, zend_bool implicit); /* private */ -typedef enum_func_status (*func_mysqlnd_stmt__dtor)(MYSQLND_STMT * const stmt, zend_bool implicit); /* use this for mysqlnd_stmt_close */ -typedef enum_func_status (*func_mysqlnd_stmt__fetch)(MYSQLND_STMT * const stmt, zend_bool * const fetched_anything); +typedef enum_func_status (*func_mysqlnd_stmt__close_on_server)(MYSQLND_STMT * const stmt, bool implicit); /* private */ +typedef enum_func_status (*func_mysqlnd_stmt__dtor)(MYSQLND_STMT * const stmt, bool implicit); /* use this for mysqlnd_stmt_close */ +typedef enum_func_status (*func_mysqlnd_stmt__fetch)(MYSQLND_STMT * const stmt, bool * const fetched_anything); typedef enum_func_status (*func_mysqlnd_stmt__bind_parameters)(MYSQLND_STMT * const stmt, MYSQLND_PARAM_BIND * const param_bind); typedef enum_func_status (*func_mysqlnd_stmt__bind_one_parameter)(MYSQLND_STMT * const stmt, unsigned int param_no, zval * const zv, zend_uchar type); typedef enum_func_status (*func_mysqlnd_stmt__refresh_bind_param)(MYSQLND_STMT * const stmt); @@ -785,7 +785,7 @@ typedef MYSQLND_RESULT_BIND*(*func_mysqlnd_stmt__alloc_result_bind)(MYSQLND_STMT typedef void (*func_mysqlnd_stmt__free_parameter_bind)(MYSQLND_STMT * const stmt, MYSQLND_PARAM_BIND *); typedef void (*func_mysqlnd_stmt__free_result_bind)(MYSQLND_STMT * const stmt, MYSQLND_RESULT_BIND *); typedef unsigned int (*func_mysqlnd_stmt__server_status)(const MYSQLND_STMT * const stmt); -typedef enum_func_status (*func_mysqlnd_stmt__generate_execute_request)(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer); +typedef enum_func_status (*func_mysqlnd_stmt__generate_execute_request)(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, bool * free_buffer); typedef enum_func_status (*func_mysqlnd_stmt__parse_execute_response)(MYSQLND_STMT * const s, enum_mysqlnd_parse_exec_response_type type); typedef void (*func_mysqlnd_stmt__free_stmt_content)(MYSQLND_STMT * const s); typedef enum_func_status (*func_mysqlnd_stmt__flush)(MYSQLND_STMT * const stmt); @@ -854,7 +854,7 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) struct st_mysqlnd_vio_data { php_stream *stream; - zend_bool ssl; + bool ssl; MYSQLND_VIO_OPTIONS options; #ifdef MYSQLND_DO_WIRE_CHECK_BEFORE_COMMAND zend_uchar last_command; @@ -862,7 +862,7 @@ struct st_mysqlnd_vio_data zend_uchar unused_pad1; #endif - zend_bool persistent; + bool persistent; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) m; }; @@ -872,7 +872,7 @@ struct st_mysqlnd_vio { struct st_mysqlnd_vio_data * data; - zend_bool persistent; + bool persistent; }; @@ -957,22 +957,22 @@ struct st_mysqlnd_connection_data zval async_read_cb; zval async_err_cb; - zend_bool in_async_read_cb; - zend_bool in_async_err_cb; + bool in_async_read_cb; + bool in_async_err_cb; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) object_factory; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_command) * command; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) * m; /* persistent connection */ - zend_bool persistent; + bool persistent; }; struct st_mysqlnd_connection { MYSQLND_CONN_DATA * data; - zend_bool persistent; + bool persistent; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) * m; }; @@ -1017,7 +1017,7 @@ typedef enum_func_status (*func_mysqlnd_protocol_payload_decoder_factory__send_c MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * payload_decoder_factory, const enum php_mysqlnd_server_command command, const zend_uchar * const arg, const size_t arg_len, - const zend_bool silent, + const bool silent, MYSQLND_CONNECTION_STATE * connection_state, MYSQLND_ERROR_INFO * error_info, @@ -1030,7 +1030,7 @@ typedef enum_func_status (*func_mysqlnd_protocol_payload_decoder_factory__send_c MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const payload_decoder_factory, MYSQLND_ERROR_INFO * const error_info, MYSQLND_UPSERT_STATUS * const upsert_status, - const zend_bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ + const bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ MYSQLND_STRING * const last_message); typedef enum_func_status (*func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_EOF)( @@ -1041,9 +1041,9 @@ typedef enum_func_status (*func_mysqlnd_protocol_payload_decoder_factory__send_c typedef enum_func_status (*func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response)( MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * payload_decoder_factory, const enum mysqlnd_packet_type ok_packet, - const zend_bool silent, + const bool silent, const enum php_mysqlnd_server_command command, - const zend_bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ + const bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ MYSQLND_ERROR_INFO * error_info, MYSQLND_UPSERT_STATUS * upsert_status, @@ -1078,7 +1078,7 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory) struct st_mysqlnd_protocol_payload_decoder_factory { MYSQLND_CONN_DATA * conn; - zend_bool persistent; + bool persistent; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory) m; }; @@ -1088,7 +1088,7 @@ typedef struct st_mysqlnd_read_buffer { size_t offset; size_t size; size_t len; - zend_bool (*is_empty)(const struct st_mysqlnd_read_buffer *); + bool (*is_empty)(const struct st_mysqlnd_read_buffer *); void (*read)(struct st_mysqlnd_read_buffer *, size_t count, zend_uchar * dest); size_t (*bytes_left)(const struct st_mysqlnd_read_buffer *); void (*free_buffer)(struct st_mysqlnd_read_buffer **); @@ -1129,8 +1129,8 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) struct st_mysqlnd_protocol_frame_codec_data { php_stream *stream; - zend_bool compressed; - zend_bool ssl; + bool compressed; + bool ssl; uint64_t flags; char * sha256_server_public_key; @@ -1144,7 +1144,7 @@ struct st_mysqlnd_protocol_frame_codec_data zend_uchar packet_no; zend_uchar compressed_envelope_packet_no; - zend_bool persistent; + bool persistent; MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) m; }; @@ -1156,7 +1156,7 @@ struct st_mysqlnd_protocol_frame_codec struct st_mysqlnd_protocol_frame_codec_data * data; - zend_bool persistent; + bool persistent; }; @@ -1218,7 +1218,7 @@ struct st_mysqlnd_unbuffered_result unsigned int field_count; - zend_bool eof_reached; + bool eof_reached; MYSQLND_STMT_DATA *stmt; }; @@ -1256,7 +1256,7 @@ struct st_mysqlnd_param_bind struct st_mysqlnd_result_bind { zval zv; - zend_bool bound; + bool bound; }; @@ -1279,16 +1279,16 @@ struct st_mysqlnd_stmt_data MYSQLND_ERROR_INFO * error_info; MYSQLND_ERROR_INFO error_info_impl; - zend_bool update_max_length; + bool update_max_length; zend_ulong prefetch_rows; - zend_bool cursor_exists; + bool cursor_exists; mysqlnd_stmt_use_or_store_func default_rset_handler; zval execute_read_cb; zval execute_err_cb; - zend_bool in_execute_read_cb; - zend_bool in_execute_err_cb; + bool in_execute_read_cb; + bool in_execute_err_cb; MYSQLND_CMD_BUFFER execute_cmd_buffer; unsigned int execute_count;/* count how many times the stmt was executed */ diff --git a/ext/mysqlnd/mysqlnd_vio.c b/ext/mysqlnd/mysqlnd_vio.c index e33761f278..82a45ed7f0 100644 --- a/ext/mysqlnd/mysqlnd_vio.c +++ b/ext/mysqlnd/mysqlnd_vio.c @@ -115,7 +115,7 @@ MYSQLND_METHOD(mysqlnd_vio, network_write)(MYSQLND_VIO * const vio, const zend_u /* {{{ mysqlnd_vio::open_pipe */ static php_stream * -MYSQLND_METHOD(mysqlnd_vio, open_pipe)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const zend_bool persistent, +MYSQLND_METHOD(mysqlnd_vio, open_pipe)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info) { unsigned int streams_options = 0; @@ -150,7 +150,7 @@ MYSQLND_METHOD(mysqlnd_vio, open_pipe)(MYSQLND_VIO * const vio, const MYSQLND_CS /* {{{ mysqlnd_vio::open_tcp_or_unix */ static php_stream * -MYSQLND_METHOD(mysqlnd_vio, open_tcp_or_unix)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const zend_bool persistent, +MYSQLND_METHOD(mysqlnd_vio, open_tcp_or_unix)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info) { unsigned int streams_options = 0; @@ -298,7 +298,7 @@ MYSQLND_METHOD(mysqlnd_vio, get_open_stream)(MYSQLND_VIO * const vio, const MYSQ /* {{{ mysqlnd_vio::connect */ static enum_func_status -MYSQLND_METHOD(mysqlnd_vio, connect)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const zend_bool persistent, +MYSQLND_METHOD(mysqlnd_vio, connect)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info) { enum_func_status ret = FAIL; @@ -339,7 +339,7 @@ MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mys break; case MYSQLND_OPT_SSL_KEY: { - zend_bool pers = net->persistent; + bool pers = net->persistent; if (net->data->options.ssl_key) { mnd_pefree(net->data->options.ssl_key, pers); } @@ -348,7 +348,7 @@ MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mys } case MYSQLND_OPT_SSL_CERT: { - zend_bool pers = net->persistent; + bool pers = net->persistent; if (net->data->options.ssl_cert) { mnd_pefree(net->data->options.ssl_cert, pers); } @@ -357,7 +357,7 @@ MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mys } case MYSQLND_OPT_SSL_CA: { - zend_bool pers = net->persistent; + bool pers = net->persistent; if (net->data->options.ssl_ca) { mnd_pefree(net->data->options.ssl_ca, pers); } @@ -366,7 +366,7 @@ MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mys } case MYSQLND_OPT_SSL_CAPATH: { - zend_bool pers = net->persistent; + bool pers = net->persistent; if (net->data->options.ssl_capath) { mnd_pefree(net->data->options.ssl_capath, pers); } @@ -375,7 +375,7 @@ MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mys } case MYSQLND_OPT_SSL_CIPHER: { - zend_bool pers = net->persistent; + bool pers = net->persistent; if (net->data->options.ssl_cipher) { mnd_pefree(net->data->options.ssl_cipher, pers); } @@ -384,7 +384,7 @@ MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mys } case MYSQLND_OPT_SSL_PASSPHRASE: { - zend_bool pers = net->persistent; + bool pers = net->persistent; if (net->data->options.ssl_passphrase) { mnd_pefree(net->data->options.ssl_passphrase, pers); } @@ -492,7 +492,7 @@ MYSQLND_METHOD(mysqlnd_vio, enable_ssl)(MYSQLND_VIO * const net) #ifdef MYSQLND_SSL_SUPPORTED php_stream_context * context = php_stream_context_alloc(); php_stream * net_stream = net->data->m.get_stream(net); - zend_bool any_flag = FALSE; + bool any_flag = FALSE; DBG_ENTER("mysqlnd_vio::enable_ssl"); @@ -543,7 +543,7 @@ MYSQLND_METHOD(mysqlnd_vio, enable_ssl)(MYSQLND_VIO * const net) } { zval verify_peer_zval; - zend_bool verify; + bool verify; if (net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_DEFAULT) { net->data->options.ssl_verify_peer = any_flag? MYSQLND_SSL_PEER_DEFAULT_ACTION:MYSQLND_SSL_PEER_DONT_VERIFY; @@ -610,7 +610,7 @@ MYSQLND_METHOD(mysqlnd_vio, disable_ssl)(MYSQLND_VIO * const vio) static void MYSQLND_METHOD(mysqlnd_vio, free_contents)(MYSQLND_VIO * net) { - zend_bool pers = net->persistent; + bool pers = net->persistent; DBG_ENTER("mysqlnd_vio::free_contents"); if (net->data->options.ssl_key) { @@ -646,7 +646,7 @@ MYSQLND_METHOD(mysqlnd_vio, close_stream)(MYSQLND_VIO * const net, MYSQLND_STATS php_stream * net_stream; DBG_ENTER("mysqlnd_vio::close_stream"); if (net && (net_stream = net->data->m.get_stream(net))) { - zend_bool pers = net->persistent; + bool pers = net->persistent; DBG_INF_FMT("Freeing stream. abstract=%p", net_stream->abstract); /* We removed the resource from the stream, so pass FREE_RSRC_DTOR now to force * destruction to occur during shutdown, because it won't happen through the resource. */ @@ -728,7 +728,7 @@ MYSQLND_METHOD(mysqlnd_vio, set_stream)(MYSQLND_VIO * const vio, php_stream * ne /* {{{ mysqlnd_vio::has_valid_stream */ -static zend_bool +static bool MYSQLND_METHOD(mysqlnd_vio, has_valid_stream)(const MYSQLND_VIO * const vio) { DBG_ENTER("mysqlnd_vio::has_valid_stream"); @@ -770,7 +770,7 @@ MYSQLND_CLASS_METHODS_END; /* {{{ mysqlnd_vio_init */ PHPAPI MYSQLND_VIO * -mysqlnd_vio_init(zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) +mysqlnd_vio_init(bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) { MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory = object_factory? object_factory : &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory); MYSQLND_VIO * vio; diff --git a/ext/mysqlnd/mysqlnd_vio.h b/ext/mysqlnd/mysqlnd_vio.h index 7c71aaa01e..c4982e0312 100644 --- a/ext/mysqlnd/mysqlnd_vio.h +++ b/ext/mysqlnd/mysqlnd_vio.h @@ -18,7 +18,7 @@ #ifndef MYSQLND_VIO_H #define MYSQLND_VIO_H -PHPAPI MYSQLND_VIO * mysqlnd_vio_init(zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); +PHPAPI MYSQLND_VIO * mysqlnd_vio_init(bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); PHPAPI void mysqlnd_vio_free(MYSQLND_VIO * const vio, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); #endif /* MYSQLND_VIO_H */ diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 0d601e5b98..7a66d05c75 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -1436,7 +1436,7 @@ php_mysqlnd_read_row_ex(MYSQLND_PFC * pfc, enum_func_status php_mysqlnd_rowp_read_binary_protocol(MYSQLND_ROW_BUFFER * row_buffer, zval * fields, const unsigned int field_count, const MYSQLND_FIELD * const fields_metadata, - const zend_bool as_int_or_float, MYSQLND_STATS * const stats) + const bool as_int_or_float, MYSQLND_STATS * const stats) { unsigned int i; const zend_uchar * p = row_buffer->ptr; @@ -1527,7 +1527,7 @@ php_mysqlnd_rowp_read_binary_protocol(MYSQLND_ROW_BUFFER * row_buffer, zval * fi enum_func_status php_mysqlnd_rowp_read_text_protocol(MYSQLND_ROW_BUFFER * row_buffer, zval * fields, unsigned int field_count, const MYSQLND_FIELD * fields_metadata, - zend_bool as_int_or_float, MYSQLND_STATS * stats) + bool as_int_or_float, MYSQLND_STATS * stats) { unsigned int i; zval *current_field, *end_field, *start_field; @@ -1631,7 +1631,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_ROW_BUFFER * row_buffer, zval * fiel #else (uint64_t) _atoi64((char *) p); #endif - zend_bool uns = fields_metadata[i].flags & UNSIGNED_FLAG? TRUE:FALSE; + bool uns = fields_metadata[i].flags & UNSIGNED_FLAG? TRUE:FALSE; /* We have to make it ASCIIZ temporarily */ #if SIZEOF_ZEND_LONG==8 if (uns == TRUE && v > 9223372036854775807L) @@ -2436,7 +2436,7 @@ MYSQLND_METHOD(mysqlnd_protocol, send_command)( MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * payload_decoder_factory, const enum php_mysqlnd_server_command command, const zend_uchar * const arg, const size_t arg_len, - const zend_bool silent, + const bool silent, struct st_mysqlnd_connection_state * connection_state, MYSQLND_ERROR_INFO * error_info, @@ -2502,7 +2502,7 @@ MYSQLND_METHOD(mysqlnd_protocol, send_command_handle_OK)( MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const payload_decoder_factory, MYSQLND_ERROR_INFO * const error_info, MYSQLND_UPSERT_STATUS * const upsert_status, - const zend_bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ + const bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ MYSQLND_STRING * const last_message) { enum_func_status ret = FAIL; @@ -2596,9 +2596,9 @@ static enum_func_status MYSQLND_METHOD(mysqlnd_protocol, send_command_handle_response)( MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * payload_decoder_factory, const enum mysqlnd_packet_type ok_packet, - const zend_bool silent, + const bool silent, const enum php_mysqlnd_server_command command, - const zend_bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ + const bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */ MYSQLND_ERROR_INFO * error_info, MYSQLND_UPSERT_STATUS * upsert_status, @@ -2658,7 +2658,7 @@ MYSQLND_CLASS_METHODS_END; /* {{{ mysqlnd_protocol_payload_decoder_factory_init */ PHPAPI MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * -mysqlnd_protocol_payload_decoder_factory_init(MYSQLND_CONN_DATA * conn, const zend_bool persistent) +mysqlnd_protocol_payload_decoder_factory_init(MYSQLND_CONN_DATA * conn, const bool persistent) { MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * ret; DBG_ENTER("mysqlnd_protocol_payload_decoder_factory_init"); @@ -2675,7 +2675,7 @@ mysqlnd_protocol_payload_decoder_factory_free(MYSQLND_PROTOCOL_PAYLOAD_DECODER_F DBG_ENTER("mysqlnd_protocol_payload_decoder_factory_free"); if (factory) { - zend_bool pers = factory->persistent; + bool pers = factory->persistent; mnd_pefree(factory, pers); } DBG_VOID_RETURN; diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index 7cbfe0afd6..7b5b6194ae 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -69,7 +69,7 @@ typedef struct st_mysqlnd_packet_greet { uint8_t charset_no; uint16_t server_status; /* 13 byte pad, in 5.5 first 2 bytes are more capabilities followed by 1 byte scramble_length */ - zend_bool pre41; + bool pre41; /* If error packet, we use these */ char error[MYSQLND_ERRMSG_SIZE+1]; char sqlstate[MYSQLND_SQLSTATE_LENGTH + 1]; @@ -90,9 +90,9 @@ typedef struct st_mysqlnd_packet_auth { uint32_t max_packet_size; uint8_t charset_no; /* Here the packet ends. This is user supplied data */ - zend_bool send_auth_data; - zend_bool is_change_user_packet; - zend_bool silent; + bool send_auth_data; + bool is_change_user_packet; + bool silent; HashTable *connect_attr; size_t db_len; } MYSQLND_PACKET_AUTH; @@ -197,7 +197,7 @@ typedef struct st_mysqlnd_packet_res_field { MYSQLND_MEMORY_POOL *memory_pool; MYSQLND_FIELD *metadata; /* For table definitions, empty for result sets */ - zend_bool skip_parsing; + bool skip_parsing; MYSQLND_ERROR_INFO error_info; } MYSQLND_PACKET_RES_FIELD; @@ -207,7 +207,7 @@ typedef struct st_mysqlnd_packet_res_field { typedef struct st_mysqlnd_packet_row { MYSQLND_PACKET_HEADER header; uint32_t field_count; - zend_bool eof; + bool eof; /* These are, of course, only for SELECT in the EOF packet, which is detected by this packet @@ -218,7 +218,7 @@ typedef struct st_mysqlnd_packet_row { MYSQLND_ROW_BUFFER row_buffer; MYSQLND_MEMORY_POOL * result_set_memory_pool; - zend_bool binary_protocol; + bool binary_protocol; MYSQLND_FIELD *fields_metadata; /* If error packet, we use these */ @@ -257,7 +257,7 @@ typedef struct st_mysqlnd_packet_chg_user_resp { uint16_t server_capabilities; /* If error packet, we use these */ MYSQLND_ERROR_INFO error_info; - zend_bool server_asked_323_auth; + bool server_asked_323_auth; char *new_auth_protocol; size_t new_auth_protocol_len; @@ -305,15 +305,15 @@ PHPAPI extern const char * const mysqlnd_empty_string; enum_func_status php_mysqlnd_rowp_read_binary_protocol(MYSQLND_ROW_BUFFER * row_buffer, zval * fields, unsigned int field_count, const MYSQLND_FIELD * fields_metadata, - zend_bool as_int_or_float, MYSQLND_STATS * stats); + bool as_int_or_float, MYSQLND_STATS * stats); enum_func_status php_mysqlnd_rowp_read_text_protocol(MYSQLND_ROW_BUFFER * row_buffer, zval * fields, unsigned int field_count, const MYSQLND_FIELD * fields_metadata, - zend_bool as_int_or_float, MYSQLND_STATS * stats); + bool as_int_or_float, MYSQLND_STATS * stats); -PHPAPI MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * mysqlnd_protocol_payload_decoder_factory_init(MYSQLND_CONN_DATA * conn, const zend_bool persistent); +PHPAPI MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * mysqlnd_protocol_payload_decoder_factory_init(MYSQLND_CONN_DATA * conn, const bool persistent); PHPAPI void mysqlnd_protocol_payload_decoder_factory_free(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const payload_decoder_factory); #endif /* MYSQLND_WIREPROTOCOL_H */ diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index ad9b23a9c4..c333a4d3a4 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -923,8 +923,8 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char smart_str hashed_details = {0}; time_t timestamp; php_oci_spool *session_pool = NULL; - zend_bool use_spool = 1; /* Default is to use client-side session pool */ - zend_bool ping_done = 0; + bool use_spool = 1; /* Default is to use client-side session pool */ + bool ping_done = 0; ub2 charsetid = 0; ub2 charsetid_nls_lang = 0; @@ -1042,7 +1042,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char php_strtolower(ZSTR_VAL(hashed_details.s), ZSTR_LEN(hashed_details.s)); if (!exclusive && !new_password) { - zend_bool found = 0; + bool found = 0; if (persistent && ((zvp = zend_hash_find(&EG(persistent_list), hashed_details.s))) != NULL) { zend_resource *le = Z_RES_P(zvp); @@ -1190,7 +1190,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char * a last resort, return a non-persistent connection. */ if (persistent) { - zend_bool alloc_non_persistent = 0; + bool alloc_non_persistent = 0; if (OCI_G(max_persistent) != -1 && OCI_G(num_persistent) >= OCI_G(max_persistent)) { /* try to find an idle connection and kill it */ @@ -1436,7 +1436,7 @@ int php_oci_connection_commit(php_oci_connection *connection) static int php_oci_connection_close(php_oci_connection *connection) { int result = 0; - zend_bool in_call_save = OCI_G(in_call); + bool in_call_save = OCI_G(in_call); #ifdef HAVE_OCI8_DTRACE if (DTRACE_OCI8_CONNECTION_CLOSE_ENABLED()) { @@ -1528,7 +1528,7 @@ static int php_oci_connection_close(php_oci_connection *connection) int php_oci_connection_release(php_oci_connection *connection) { int result = 0; - zend_bool in_call_save = OCI_G(in_call); + bool in_call_save = OCI_G(in_call); time_t timestamp = time(NULL); if (connection->is_stub) { @@ -1989,7 +1989,7 @@ static int php_oci_persistent_helper(zval *zv) static php_oci_spool *php_oci_create_spool(char *username, int username_len, char *password, int password_len, char *dbname, int dbname_len, zend_string *hash_key, int charsetid) { php_oci_spool *session_pool = NULL; - zend_bool iserror = 0; + bool iserror = 0; ub4 poolmode = OCI_DEFAULT; /* Mode to be passed to OCISessionPoolCreate */ OCIAuthInfo *spoolAuth = NULL; sword errstatus; @@ -2128,7 +2128,7 @@ static php_oci_spool *php_oci_get_spool(char *username, int username_len, char * smart_str spool_hashed_details = {0}; php_oci_spool *session_pool = NULL; zend_resource *spool_out_le = NULL; - zend_bool iserror = 0; + bool iserror = 0; zval *spool_out_zv = NULL; /* {{{ Create the spool hash key */ diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c index df71b510fd..416ab92677 100644 --- a/ext/oci8/oci8_interface.c +++ b/ext/oci8/oci8_interface.c @@ -528,7 +528,7 @@ PHP_FUNCTION(oci_lob_write) php_oci_descriptor *descriptor; size_t data_len; zend_long write_len; - zend_bool write_len_is_null = 1; + bool write_len_is_null = 1; ub4 bytes_written; char *data; @@ -628,7 +628,7 @@ PHP_FUNCTION(oci_lob_erase) php_oci_descriptor *descriptor; ub4 bytes_erased; zend_long offset, length; - zend_bool offset_is_null = 1, length_is_null = 1; + bool offset_is_null = 1, length_is_null = 1; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O|l!l!", &z_descriptor, oci_lob_class_entry_ptr, &offset, &offset_is_null, &length, &length_is_null) == FAILURE) { RETURN_THROWS(); @@ -697,7 +697,7 @@ PHP_FUNCTION(ocisetbufferinglob) { zval *tmp, *z_descriptor; php_oci_descriptor *descriptor; - zend_bool flag; + bool flag; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Ob", &z_descriptor, oci_lob_class_entry_ptr, &flag) == FAILURE) { RETURN_THROWS(); @@ -747,7 +747,7 @@ PHP_FUNCTION(oci_lob_copy) zval *tmp_dest, *tmp_from, *z_descriptor_dest, *z_descriptor_from; php_oci_descriptor *descriptor_dest, *descriptor_from; zend_long length; - zend_bool length_is_null = 1; + bool length_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO|l!", &z_descriptor_dest, oci_lob_class_entry_ptr, &z_descriptor_from, oci_lob_class_entry_ptr, &length, &length_is_null) == FAILURE) { RETURN_THROWS(); @@ -824,7 +824,7 @@ PHP_FUNCTION(oci_lob_export) char *buffer; size_t filename_len; zend_long start, length, block_length; - zend_bool start_is_null = 1, length_is_null = 1; + bool start_is_null = 1, length_is_null = 1; php_stream *stream; ub4 lob_length; diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c index 852439e114..e08878f81d 100644 --- a/ext/oci8/oci8_statement.c +++ b/ext/oci8/oci8_statement.c @@ -250,7 +250,7 @@ int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows) void *handlepp; ub4 typep, iterp, idxp; ub1 in_outp, piecep; - zend_bool piecewisecols = 0; + bool piecewisecols = 0; php_oci_out_column *column; sword errstatus; diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h index 825437bc57..b462aa762d 100644 --- a/ext/oci8/php_oci8_int.h +++ b/ext/oci8/php_oci8_int.h @@ -519,16 +519,16 @@ ZEND_BEGIN_MODULE_GLOBALS(oci) /* {{{ Module globals */ zend_long persistent_timeout; /* time period after which idle persistent connection is considered expired */ zend_long statement_cache_size; /* statement cache size. used with 9i+ clients only*/ zend_long default_prefetch; /* default prefetch setting */ - zend_bool privileged_connect; /* privileged connect flag (On/Off) */ - zend_bool old_oci_close_semantics; /* old_oci_close_semantics flag (to determine the way oci_close() should behave) */ + bool privileged_connect; /* privileged connect flag (On/Off) */ + bool old_oci_close_semantics; /* old_oci_close_semantics flag (to determine the way oci_close() should behave) */ int shutdown; /* in shutdown flag */ OCIEnv *env; /* global environment handle */ - zend_bool in_call; + bool in_call; char *connection_class; - zend_bool events; + bool events; char *edition; ZEND_END_MODULE_GLOBALS(oci) /* }}} */ diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index e7498ee2b7..05e371d05f 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -1661,7 +1661,7 @@ PHP_FUNCTION(odbc_fetch_row) RETCODE rc; zval *pv_res; zend_long pv_row; - zend_bool pv_row_is_null = 1; + bool pv_row_is_null = 1; #ifdef HAVE_SQL_EXTENDED_FETCH SQLULEN crow; SQLUSMALLINT RowStatus[1]; @@ -2540,7 +2540,7 @@ PHP_FUNCTION(odbc_autocommit) odbc_connection *conn; RETCODE rc; zval *pv_conn; - zend_bool pv_onoff = 0; + bool pv_onoff = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|b", &pv_conn, &pv_onoff) == FAILURE) { RETURN_THROWS(); diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c index bad814ed6e..e833ff3dbf 100644 --- a/ext/opcache/Optimizer/block_pass.c +++ b/ext/opcache/Optimizer/block_pass.c @@ -893,7 +893,7 @@ optimize_const_unary_op: src = VAR_SOURCE(opline->op1); if (src && src->opcode == ZEND_QM_ASSIGN) { zend_op *op = src + 1; - zend_bool optimize = 1; + bool optimize = 1; while (op < opline) { if ((op->op1_type == opline->op1_type diff --git a/ext/opcache/Optimizer/dce.c b/ext/opcache/Optimizer/dce.c index d21c40d189..339b08167d 100644 --- a/ext/opcache/Optimizer/dce.c +++ b/ext/opcache/Optimizer/dce.c @@ -60,7 +60,7 @@ typedef struct { unsigned reorder_dtor_effects : 1; } context; -static inline zend_bool is_bad_mod(const zend_ssa *ssa, int use, int def) { +static inline bool is_bad_mod(const zend_ssa *ssa, int use, int def) { if (def < 0) { /* This modification is not tracked by SSA, assume the worst */ return 1; @@ -72,10 +72,10 @@ static inline zend_bool is_bad_mod(const zend_ssa *ssa, int use, int def) { return 0; } -static inline zend_bool may_have_side_effects( +static inline bool may_have_side_effects( zend_op_array *op_array, zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op, - zend_bool reorder_dtor_effects) { + bool reorder_dtor_effects) { switch (opline->opcode) { case ZEND_NOP: case ZEND_IS_IDENTICAL: @@ -310,7 +310,7 @@ static zend_always_inline void add_phi_sources_to_worklists(context *ctx, zend_s } FOREACH_PHI_SOURCE_END(); } -static inline zend_bool is_var_dead(context *ctx, int var_num) { +static inline bool is_var_dead(context *ctx, int var_num) { zend_ssa_var *var = &ctx->ssa->vars[var_num]; if (var->definition_phi) { return zend_bitset_in(ctx->phi_dead, var_num); @@ -325,7 +325,7 @@ static inline zend_bool is_var_dead(context *ctx, int var_num) { } // Sometimes we can mark the var as EXT_UNUSED -static zend_bool try_remove_var_def(context *ctx, int free_var, int use_chain, zend_op *opline) { +static bool try_remove_var_def(context *ctx, int free_var, int use_chain, zend_op *opline) { if (use_chain >= 0) { return 0; } @@ -379,7 +379,7 @@ static zend_bool try_remove_var_def(context *ctx, int free_var, int use_chain, z return 0; } -static inline zend_bool is_free_of_live_var(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) { +static inline bool is_free_of_live_var(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) { switch (opline->opcode) { case ZEND_FREE: /* It is always safe to remove FREEs of non-refcounted values, even if they are live. */ @@ -395,7 +395,7 @@ static inline zend_bool is_free_of_live_var(context *ctx, zend_op *opline, zend_ } /* Returns whether the instruction has been DCEd */ -static zend_bool dce_instr(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) { +static bool dce_instr(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) { zend_ssa *ssa = ctx->ssa; int free_var = -1; zend_uchar free_var_type; @@ -483,7 +483,7 @@ static void try_remove_trivial_phi(context *ctx, zend_ssa_phi *phi) { } } -static inline zend_bool may_break_varargs(const zend_op_array *op_array, const zend_ssa *ssa, const zend_ssa_op *ssa_op) { +static inline bool may_break_varargs(const zend_op_array *op_array, const zend_ssa *ssa, const zend_ssa_op *ssa_op) { if (ssa_op->op1_def >= 0 && ssa->vars[ssa_op->op1_def].var < op_array->num_args) { return 1; @@ -499,13 +499,13 @@ static inline zend_bool may_break_varargs(const zend_op_array *op_array, const z return 0; } -int dce_optimize_op_array(zend_op_array *op_array, zend_ssa *ssa, zend_bool reorder_dtor_effects) { +int dce_optimize_op_array(zend_op_array *op_array, zend_ssa *ssa, bool reorder_dtor_effects) { int i; zend_ssa_phi *phi; int removed_ops = 0; /* DCE of CV operations that changes arguments may affect vararg functions. */ - zend_bool has_varargs = (ssa->cfg.flags & ZEND_FUNC_VARARG) != 0; + bool has_varargs = (ssa->cfg.flags & ZEND_FUNC_VARARG) != 0; context ctx; ctx.ssa = ssa; diff --git a/ext/opcache/Optimizer/dfa_pass.c b/ext/opcache/Optimizer/dfa_pass.c index 0ac6c563d0..fe06de276b 100644 --- a/ext/opcache/Optimizer/dfa_pass.c +++ b/ext/opcache/Optimizer/dfa_pass.c @@ -280,7 +280,7 @@ static void zend_ssa_remove_nops(zend_op_array *op_array, zend_ssa *ssa, zend_op free_alloca(shiftlist, use_heap); } -static zend_bool safe_instanceof(zend_class_entry *ce1, zend_class_entry *ce2) { +static bool safe_instanceof(zend_class_entry *ce1, zend_class_entry *ce2) { if (ce1 == ce2) { return 1; } @@ -291,7 +291,7 @@ static zend_bool safe_instanceof(zend_class_entry *ce1, zend_class_entry *ce2) { return instanceof_function(ce1, ce2); } -static inline zend_bool can_elide_return_type_check( +static inline bool can_elide_return_type_check( zend_op_array *op_array, zend_ssa *ssa, zend_ssa_op *ssa_op) { zend_arg_info *info = &op_array->arg_info[-1]; zend_ssa_var_info *use_info = &ssa->var_info[ssa_op->op1_use]; @@ -322,7 +322,7 @@ static inline zend_bool can_elide_return_type_check( return 1; } -static zend_bool opline_supports_assign_contraction( +static bool opline_supports_assign_contraction( zend_ssa *ssa, zend_op *opline, int src_var, uint32_t cv_var) { if (opline->opcode == ZEND_NEW) { /* see Zend/tests/generators/aborted_yield_during_new.phpt */ @@ -380,7 +380,7 @@ int zend_dfa_optimize_calls(zend_op_array *op_array, zend_ssa *ssa) zend_op *send_array; zend_op *send_needly; - zend_bool strict = 0; + bool strict = 0; if (call_info->caller_init_opline->extended_value == 2) { send_array = call_info->caller_call_opline - 1; @@ -924,7 +924,7 @@ optimize_jmpnz: if (opline->op1_type == IS_CONST) { zval *zv = CT_CONSTANT_EX(op_array, opline->op1.constant); zend_uchar type = Z_TYPE_P(zv); - zend_bool correct_type = + bool correct_type = (opline->opcode == ZEND_SWITCH_LONG && type == IS_LONG) || (opline->opcode == ZEND_SWITCH_STRING && type == IS_STRING) || (opline->opcode == ZEND_MATCH && (type == IS_LONG || type == IS_STRING)); diff --git a/ext/opcache/Optimizer/escape_analysis.c b/ext/opcache/Optimizer/escape_analysis.c index a5577d5995..c0d5081c1f 100644 --- a/ext/opcache/Optimizer/escape_analysis.c +++ b/ext/opcache/Optimizer/escape_analysis.c @@ -388,7 +388,7 @@ int zend_ssa_escape_analysis(const zend_script *script, zend_op_array *op_array, int ssa_vars_count = ssa->vars_count; int i, root, use; int *ees; - zend_bool has_allocations; + bool has_allocations; int num_non_escaped; ALLOCA_FLAG(use_heap) @@ -469,7 +469,7 @@ int zend_ssa_escape_analysis(const zend_script *script, zend_op_array *op_array, /* 4. Process referential dependencies */ if (num_non_escaped) { - zend_bool changed; + bool changed; do { changed = 0; diff --git a/ext/opcache/Optimizer/optimize_func_calls.c b/ext/opcache/Optimizer/optimize_func_calls.c index b1d8f6b929..319b17438d 100644 --- a/ext/opcache/Optimizer/optimize_func_calls.c +++ b/ext/opcache/Optimizer/optimize_func_calls.c @@ -39,8 +39,8 @@ typedef struct _optimizer_call_info { zend_function *func; zend_op *opline; - zend_bool is_prototype; - zend_bool try_inline; + bool is_prototype; + bool try_inline; uint32_t func_arg_num; } optimizer_call_info; diff --git a/ext/opcache/Optimizer/pass1.c b/ext/opcache/Optimizer/pass1.c index 74f6153670..86774afef4 100644 --- a/ext/opcache/Optimizer/pass1.c +++ b/ext/opcache/Optimizer/pass1.c @@ -40,7 +40,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) { zend_op *opline = op_array->opcodes; zend_op *end = opline + op_array->last; - zend_bool collect_constants = (ZEND_OPTIMIZER_PASS_15 & ctx->optimization_level)? + bool collect_constants = (ZEND_OPTIMIZER_PASS_15 & ctx->optimization_level)? (op_array == &ctx->script->main_op_array) : 0; while (opline < end) { diff --git a/ext/opcache/Optimizer/sccp.c b/ext/opcache/Optimizer/sccp.c index 6ca1301e2d..7f9bdbdbb5 100644 --- a/ext/opcache/Optimizer/sccp.c +++ b/ext/opcache/Optimizer/sccp.c @@ -142,7 +142,7 @@ static void dup_partial_object(zval *dst, zval *src) Z_ARR_P(dst) = zend_array_dup(Z_ARR_P(src)); } -static inline zend_bool value_known(zval *zv) { +static inline bool value_known(zval *zv) { return !IS_TOP(zv) && !IS_BOT(zv); } @@ -207,7 +207,7 @@ static zval *get_op2_value(sccp_ctx *ctx, zend_op *opline, zend_ssa_op *ssa_op) } } -static zend_bool can_replace_op1( +static bool can_replace_op1( const zend_op_array *op_array, zend_op *opline, zend_ssa_op *ssa_op) { switch (opline->opcode) { case ZEND_PRE_INC: @@ -276,7 +276,7 @@ static zend_bool can_replace_op1( return 1; } -static zend_bool can_replace_op2( +static bool can_replace_op2( const zend_op_array *op_array, zend_op *opline, zend_ssa_op *ssa_op) { switch (opline->opcode) { /* Do not accept CONST */ @@ -289,7 +289,7 @@ static zend_bool can_replace_op2( return 1; } -static zend_bool try_replace_op1( +static bool try_replace_op1( sccp_ctx *ctx, zend_op *opline, zend_ssa_op *ssa_op, int var, zval *value) { if (ssa_op->op1_use == var && can_replace_op1(ctx->scdf.op_array, opline, ssa_op)) { zval zv; @@ -339,7 +339,7 @@ replace_op1_simple: return 0; } -static zend_bool try_replace_op2( +static bool try_replace_op2( sccp_ctx *ctx, zend_op *opline, zend_ssa_op *ssa_op, int var, zval *value) { if (ssa_op->op2_use == var && can_replace_op2(ctx->scdf.op_array, opline, ssa_op)) { zval zv; @@ -728,7 +728,7 @@ static inline void ct_eval_type_check(zval *result, uint32_t type_mask, zval *op static inline int ct_eval_in_array(zval *result, uint32_t extended_value, zval *op1, zval *op2) { HashTable *ht; - zend_bool res; + bool res; if (Z_TYPE_P(op2) != IS_ARRAY) { return FAILURE; @@ -781,7 +781,7 @@ static inline int ct_eval_array_key_exists(zval *result, zval *op1, zval *op2) { return SUCCESS; } -static zend_bool can_ct_eval_func_call(zend_string *name, uint32_t num_args, zval **args) { +static bool can_ct_eval_func_call(zend_string *name, uint32_t num_args, zval **args) { /* Functions that can be evaluated independently of what the arguments are. * It's okay if these functions throw on invalid arguments, but they should not warn. */ if (false @@ -1957,9 +1957,9 @@ static void sccp_mark_feasible_successors( case ZEND_SWITCH_STRING: case ZEND_MATCH: { - zend_bool strict_comparison = opline->opcode == ZEND_MATCH; + bool strict_comparison = opline->opcode == ZEND_MATCH; zend_uchar type = Z_TYPE_P(op1); - zend_bool correct_type = + bool correct_type = (opline->opcode == ZEND_SWITCH_LONG && type == IS_LONG) || (opline->opcode == ZEND_SWITCH_STRING && type == IS_STRING) || (opline->opcode == ZEND_MATCH && (type == IS_LONG || type == IS_STRING)); @@ -2055,7 +2055,7 @@ static int join_partial_objects(zval *a, zval *b) return SUCCESS; } -static void join_phi_values(zval *a, zval *b, zend_bool escape) { +static void join_phi_values(zval *a, zval *b, bool escape) { if (IS_BOT(a) || IS_TOP(b)) { return; } diff --git a/ext/opcache/Optimizer/scdf.c b/ext/opcache/Optimizer/scdf.c index aa7ea3a1a2..89852e89e0 100644 --- a/ext/opcache/Optimizer/scdf.c +++ b/ext/opcache/Optimizer/scdf.c @@ -185,7 +185,7 @@ void scdf_solve(scdf_ctx *scdf, const char *name) { /* If a live range starts in a reachable block and ends in an unreachable block, we should * not eliminate the latter. While it cannot be reached, the FREE opcode of the loop var * is necessary for the correctness of temporary compaction. */ -static zend_bool kept_alive_by_loop_var_free(scdf_ctx *scdf, uint32_t block_idx) { +static bool kept_alive_by_loop_var_free(scdf_ctx *scdf, uint32_t block_idx) { uint32_t i; const zend_op_array *op_array = scdf->op_array; const zend_cfg *cfg = &scdf->ssa->cfg; diff --git a/ext/opcache/Optimizer/scdf.h b/ext/opcache/Optimizer/scdf.h index 64b4b61340..1ab1cec3bd 100644 --- a/ext/opcache/Optimizer/scdf.h +++ b/ext/opcache/Optimizer/scdf.h @@ -89,7 +89,7 @@ static inline uint32_t scdf_edge(zend_cfg *cfg, int from, int to) { ZEND_UNREACHABLE(); } -static inline zend_bool scdf_is_edge_feasible(scdf_ctx *scdf, int from, int to) { +static inline bool scdf_is_edge_feasible(scdf_ctx *scdf, int from, int to) { uint32_t edge = scdf_edge(&scdf->ssa->cfg, from, to); return zend_bitset_in(scdf->feasible_edges, edge); } diff --git a/ext/opcache/Optimizer/ssa_integrity.c b/ext/opcache/Optimizer/ssa_integrity.c index 5cb383c77a..47b9d6053e 100644 --- a/ext/opcache/Optimizer/ssa_integrity.c +++ b/ext/opcache/Optimizer/ssa_integrity.c @@ -22,7 +22,7 @@ /* The ssa_verify_integrity() function ensures that that certain invariants of the SSA form and * CFG are upheld and prints messages to stderr if this is not the case. */ -static inline zend_bool is_in_use_chain(zend_ssa *ssa, int var, int check) { +static inline bool is_in_use_chain(zend_ssa *ssa, int var, int check) { int use; FOREACH_USE(&ssa->vars[var], use) { if (use == check) { @@ -32,7 +32,7 @@ static inline zend_bool is_in_use_chain(zend_ssa *ssa, int var, int check) { return 0; } -static inline zend_bool is_in_phi_use_chain(zend_ssa *ssa, int var, zend_ssa_phi *check) { +static inline bool is_in_phi_use_chain(zend_ssa *ssa, int var, zend_ssa_phi *check) { zend_ssa_phi *phi; FOREACH_PHI_USE(&ssa->vars[var], phi) { if (phi == check) { @@ -42,21 +42,21 @@ static inline zend_bool is_in_phi_use_chain(zend_ssa *ssa, int var, zend_ssa_phi return 0; } -static inline zend_bool is_used_by_op(zend_ssa *ssa, int op, int check) { +static inline bool is_used_by_op(zend_ssa *ssa, int op, int check) { zend_ssa_op *ssa_op = &ssa->ops[op]; return (ssa_op->op1_use == check) || (ssa_op->op2_use == check) || (ssa_op->result_use == check); } -static inline zend_bool is_defined_by_op(zend_ssa *ssa, int op, int check) { +static inline bool is_defined_by_op(zend_ssa *ssa, int op, int check) { zend_ssa_op *ssa_op = &ssa->ops[op]; return (ssa_op->op1_def == check) || (ssa_op->op2_def == check) || (ssa_op->result_def == check); } -static inline zend_bool is_in_phi_sources(zend_ssa *ssa, zend_ssa_phi *phi, int check) { +static inline bool is_in_phi_sources(zend_ssa *ssa, zend_ssa_phi *phi, int check) { int source; FOREACH_PHI_SOURCE(phi, source) { if (source == check) { @@ -66,7 +66,7 @@ static inline zend_bool is_in_phi_sources(zend_ssa *ssa, zend_ssa_phi *phi, int return 0; } -static inline zend_bool is_in_predecessors(zend_cfg *cfg, zend_basic_block *block, int check) { +static inline bool is_in_predecessors(zend_cfg *cfg, zend_basic_block *block, int check) { int i, *predecessors = &cfg->predecessors[block->predecessor_offset]; for (i = 0; i < block->predecessors_count; i++) { if (predecessors[i] == check) { @@ -76,7 +76,7 @@ static inline zend_bool is_in_predecessors(zend_cfg *cfg, zend_basic_block *bloc return 0; } -static inline zend_bool is_in_successors(zend_basic_block *block, int check) { +static inline bool is_in_successors(zend_basic_block *block, int check) { int s; for (s = 0; s < block->successors_count; s++) { if (block->successors[s] == check) { @@ -86,7 +86,7 @@ static inline zend_bool is_in_successors(zend_basic_block *block, int check) { return 0; } -static inline zend_bool is_var_type(zend_uchar type) { +static inline bool is_var_type(zend_uchar type) { return (type & (IS_CV|IS_VAR|IS_TMP_VAR)) != 0; } diff --git a/ext/opcache/Optimizer/zend_call_graph.c b/ext/opcache/Optimizer/zend_call_graph.c index 0fa8945f09..124596ea39 100644 --- a/ext/opcache/Optimizer/zend_call_graph.c +++ b/ext/opcache/Optimizer/zend_call_graph.c @@ -53,7 +53,7 @@ int zend_analyze_calls(zend_arena **arena, zend_script *script, uint32_t build_f int call = 0; zend_call_info **call_stack; ALLOCA_FLAG(use_heap); - zend_bool is_prototype; + bool is_prototype; call_stack = do_alloca((op_array->last / 2) * sizeof(zend_call_info*), use_heap); call_info = NULL; diff --git a/ext/opcache/Optimizer/zend_call_graph.h b/ext/opcache/Optimizer/zend_call_graph.h index 28522a1277..2a3fb4380f 100644 --- a/ext/opcache/Optimizer/zend_call_graph.h +++ b/ext/opcache/Optimizer/zend_call_graph.h @@ -34,9 +34,9 @@ struct _zend_call_info { zend_function *callee_func; zend_call_info *next_caller; zend_call_info *next_callee; - zend_bool recursive; - zend_bool send_unpack; /* Parameters passed by SEND_UNPACK or SEND_ARRAY */ - zend_bool named_args; /* Function has named arguments */ + bool recursive; + bool send_unpack; /* Parameters passed by SEND_UNPACK or SEND_ARRAY */ + bool named_args; /* Function has named arguments */ int num_args; zend_send_arg_info arg_info[1]; }; diff --git a/ext/opcache/Optimizer/zend_cfg.c b/ext/opcache/Optimizer/zend_cfg.c index 0560bcf2d5..bbf8efb41a 100644 --- a/ext/opcache/Optimizer/zend_cfg.c +++ b/ext/opcache/Optimizer/zend_cfg.c @@ -279,7 +279,7 @@ int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t b int blocks_count = 0; zend_basic_block *blocks; zval *zv; - zend_bool extra_entry_block = 0; + bool extra_entry_block = 0; cfg->flags = build_flags & (ZEND_CFG_STACKLESS|ZEND_CFG_RECV_ENTRY); diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index d43637f1e6..228051ee86 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -861,7 +861,7 @@ static uint32_t get_internal_func_info( uint32_t zend_get_func_info( const zend_call_info *call_info, const zend_ssa *ssa, - zend_class_entry **ce, zend_bool *ce_is_instanceof) + zend_class_entry **ce, bool *ce_is_instanceof) { uint32_t ret = 0; const zend_function *callee_func = call_info->callee_func; diff --git a/ext/opcache/Optimizer/zend_func_info.h b/ext/opcache/Optimizer/zend_func_info.h index 13dd2e3127..423d557f7a 100644 --- a/ext/opcache/Optimizer/zend_func_info.h +++ b/ext/opcache/Optimizer/zend_func_info.h @@ -58,7 +58,7 @@ extern int zend_func_info_rid; uint32_t zend_get_func_info( const zend_call_info *call_info, const zend_ssa *ssa, - zend_class_entry **ce, zend_bool *ce_is_instanceof); + zend_class_entry **ce, bool *ce_is_instanceof); int zend_func_info_startup(void); int zend_func_info_shutdown(void); diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index 7bd40120db..92be7ee802 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -61,7 +61,7 @@ /* Pop elements in unspecified order from worklist until it is empty */ #define WHILE_WORKLIST(worklist, len, i) do { \ - zend_bool _done = 0; \ + bool _done = 0; \ while (!_done) { \ _done = 1; \ ZEND_BITSET_FOREACH(worklist, len, i) { \ @@ -158,12 +158,12 @@ } \ } while (0) -static inline zend_bool add_will_overflow(zend_long a, zend_long b) { +static inline bool add_will_overflow(zend_long a, zend_long b) { return (b > 0 && a > ZEND_LONG_MAX - b) || (b < 0 && a < ZEND_LONG_MIN - b); } #if 0 -static inline zend_bool sub_will_overflow(zend_long a, zend_long b) { +static inline bool sub_will_overflow(zend_long a, zend_long b) { return (b > 0 && a < ZEND_LONG_MIN + b) || (b < 0 && a > ZEND_LONG_MAX + b); } @@ -513,7 +513,7 @@ static void zend_ssa_range_and(zend_long a, zend_long b, zend_long c, zend_long } } -static inline zend_bool zend_abs_range( +static inline bool zend_abs_range( zend_long min, zend_long max, zend_long *abs_min, zend_long *abs_max) { if (min == ZEND_LONG_MIN) { /* Cannot take absolute value of LONG_MIN */ @@ -539,7 +539,7 @@ static inline zend_long safe_shift_left(zend_long n, zend_long s) { return (zend_long) ((zend_ulong) n << (zend_ulong) s); } -static inline zend_bool shift_left_overflows(zend_long n, zend_long s) { +static inline bool shift_left_overflows(zend_long n, zend_long s) { /* This considers shifts that shift in the sign bit to be overflowing as well */ if (n >= 0) { return s >= SIZEOF_ZEND_LONG * 8 - 1 || safe_shift_left(n, s) < n; @@ -1504,7 +1504,7 @@ int zend_inference_propagate_range(const zend_op_array *op_array, zend_ssa *ssa, return 0; } -void zend_inference_init_range(const zend_op_array *op_array, zend_ssa *ssa, int var, zend_bool underflow, zend_long min, zend_long max, zend_bool overflow) +void zend_inference_init_range(const zend_op_array *op_array, zend_ssa *ssa, int var, bool underflow, zend_long min, zend_long max, bool overflow) { if (underflow) { min = ZEND_LONG_MIN; @@ -2346,7 +2346,7 @@ static zend_always_inline int _zend_update_type_info( zend_ssa_op *ssa_op, const zend_op **ssa_opcodes, zend_long optimization_level, - zend_bool update_worklist) + bool update_worklist) { uint32_t t1, t2; uint32_t tmp, orig; @@ -3479,7 +3479,7 @@ static zend_always_inline int _zend_update_type_info( } zend_class_entry *ce; - zend_bool ce_is_instanceof; + bool ce_is_instanceof; tmp = zend_get_func_info(call_info, ssa, &ce, &ce_is_instanceof); UPDATE_SSA_TYPE(tmp, ssa_op->result_def); if (ce) { @@ -3662,7 +3662,7 @@ int zend_infer_types_ex(const zend_op_array *op_array, const zend_script *script int ssa_vars_count = ssa->vars_count; int i, j; uint32_t tmp, worklist_len = zend_bitset_len(ssa_vars_count); - zend_bool update_worklist = 1; + bool update_worklist = 1; while (!zend_bitset_empty(worklist, worklist_len)) { j = zend_bitset_first(worklist, worklist_len); @@ -3733,18 +3733,18 @@ int zend_infer_types_ex(const zend_op_array *op_array, const zend_script *script return SUCCESS; } -static zend_bool is_narrowable_instr(zend_op *opline) { +static bool is_narrowable_instr(zend_op *opline) { return opline->opcode == ZEND_ADD || opline->opcode == ZEND_SUB || opline->opcode == ZEND_MUL || opline->opcode == ZEND_DIV; } -static zend_bool is_effective_op1_double_cast(zend_op *opline, zval *op2) { +static bool is_effective_op1_double_cast(zend_op *opline, zval *op2) { return (opline->opcode == ZEND_ADD && Z_LVAL_P(op2) == 0) || (opline->opcode == ZEND_SUB && Z_LVAL_P(op2) == 0) || (opline->opcode == ZEND_MUL && Z_LVAL_P(op2) == 1) || (opline->opcode == ZEND_DIV && Z_LVAL_P(op2) == 1); } -static zend_bool is_effective_op2_double_cast(zend_op *opline, zval *op1) { +static bool is_effective_op2_double_cast(zend_op *opline, zval *op1) { /* In PHP it holds that (double)(0-$int) is bitwise identical to 0.0-(double)$int, * so allowing SUB here is fine. */ return (opline->opcode == ZEND_ADD && Z_LVAL_P(op1) == 0) @@ -3771,7 +3771,7 @@ static zend_bool is_effective_op2_double_cast(zend_op *opline, zval *op1) { * avoid infinite loops. An iterative, worklist driven approach would be possible, but the state * management more cumbersome to implement, so we don't bother for now. */ -static zend_bool can_convert_to_double( +static bool can_convert_to_double( const zend_op_array *op_array, zend_ssa *ssa, int var_num, zval *value, zend_bitset visited) { zend_ssa_var *var = &ssa->vars[var_num]; @@ -3909,7 +3909,7 @@ static int zend_type_narrowing(const zend_op_array *op_array, const zend_script zend_bitset visited, worklist; int i, v; zend_op *opline; - zend_bool narrowed = 0; + bool narrowed = 0; ALLOCA_FLAG(use_heap) visited = ZEND_BITSET_ALLOCA(2 * bitset_len, use_heap); diff --git a/ext/opcache/Optimizer/zend_inference.h b/ext/opcache/Optimizer/zend_inference.h index 212679df5e..11a9d74d75 100644 --- a/ext/opcache/Optimizer/zend_inference.h +++ b/ext/opcache/Optimizer/zend_inference.h @@ -40,7 +40,7 @@ |MAY_BE_ARRAY_OF_ARRAY|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_ARRAY_OF_RESOURCE) #define DEFINE_SSA_OP_HAS_RANGE(opN) \ - static zend_always_inline zend_bool _ssa_##opN##_has_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \ + static zend_always_inline bool _ssa_##opN##_has_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \ { \ if (opline->opN##_type == IS_CONST) { \ zval *zv = CRT_CONSTANT(opline->opN); \ @@ -239,11 +239,11 @@ DEFINE_SSA_OP_DEF_INFO(result) #define OP2_DATA_DEF_INFO() (_ssa_op2_def_info(op_array, ssa, (opline+1), (ssa_op+1))) #define RES_INFO() (_ssa_result_def_info(op_array, ssa, opline, ssa_op)) -static zend_always_inline zend_bool zend_add_will_overflow(zend_long a, zend_long b) { +static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) { return (b > 0 && a > ZEND_LONG_MAX - b) || (b < 0 && a < ZEND_LONG_MIN - b); } -static zend_always_inline zend_bool zend_sub_will_overflow(zend_long a, zend_long b) { +static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) { return (b > 0 && a < ZEND_LONG_MIN + b) || (b < 0 && a > ZEND_LONG_MAX + b); } @@ -258,7 +258,7 @@ uint32_t zend_array_element_type(uint32_t t1, zend_uchar op_type, int write, int int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int var, int widening, int narrowing, zend_ssa_range *tmp); int zend_inference_propagate_range(const zend_op_array *op_array, zend_ssa *ssa, zend_op *opline, zend_ssa_op* ssa_op, int var, zend_ssa_range *tmp); -void zend_inference_init_range(const zend_op_array *op_array, zend_ssa *ssa, int var, zend_bool underflow, zend_long min, zend_long max, zend_bool overflow); +void zend_inference_init_range(const zend_op_array *op_array, zend_ssa *ssa, int var, bool underflow, zend_long min, zend_long max, bool overflow); int zend_inference_narrowing_meet(zend_ssa_var_info *var_info, zend_ssa_range *r); int zend_inference_widening_meet(zend_ssa_var_info *var_info, zend_ssa_range *r); void zend_inference_check_recursive_dependencies(zend_op_array *op_array); diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c index c80992ed8d..00c579491a 100644 --- a/ext/opcache/Optimizer/zend_optimizer.c +++ b/ext/opcache/Optimizer/zend_optimizer.c @@ -785,7 +785,7 @@ static zend_class_entry *get_class_entry_from_op1( } zend_function *zend_optimizer_get_called_func( - zend_script *script, zend_op_array *op_array, zend_op *opline, zend_bool *is_prototype) + zend_script *script, zend_op_array *op_array, zend_op *opline, bool *is_prototype) { *is_prototype = 0; switch (opline->opcode) { @@ -832,8 +832,8 @@ zend_function *zend_optimizer_get_called_func( zend_string *func_name = Z_STR_P(CRT_CONSTANT(opline->op2) + 1); zend_function *fbc = zend_hash_find_ptr(&ce->function_table, func_name); if (fbc) { - zend_bool is_public = (fbc->common.fn_flags & ZEND_ACC_PUBLIC) != 0; - zend_bool same_scope = fbc->common.scope == op_array->scope; + bool is_public = (fbc->common.fn_flags & ZEND_ACC_PUBLIC) != 0; + bool same_scope = fbc->common.scope == op_array->scope; if (is_public || same_scope) { return fbc; } @@ -851,9 +851,9 @@ zend_function *zend_optimizer_get_called_func( zend_function *fbc = zend_hash_find_ptr( &op_array->scope->function_table, method_name); if (fbc) { - zend_bool is_private = (fbc->common.fn_flags & ZEND_ACC_PRIVATE) != 0; - zend_bool is_final = (fbc->common.fn_flags & ZEND_ACC_FINAL) != 0; - zend_bool same_scope = fbc->common.scope == op_array->scope; + bool is_private = (fbc->common.fn_flags & ZEND_ACC_PRIVATE) != 0; + bool is_final = (fbc->common.fn_flags & ZEND_ACC_FINAL) != 0; + bool same_scope = fbc->common.scope == op_array->scope; if (is_private) { /* Only use private method if in the same scope. We can't even use it * as a prototype, as it may be overridden with changed signature. */ @@ -1347,7 +1347,7 @@ static void zend_adjust_fcall_stack_size_graph(zend_op_array *op_array) } } -static zend_bool needs_live_range(zend_op_array *op_array, zend_op *def_opline) { +static bool needs_live_range(zend_op_array *op_array, zend_op *def_opline) { zend_func_info *func_info = ZEND_FUNC_INFO(op_array); zend_ssa_op *ssa_op = &func_info->ssa.ops[def_opline - op_array->opcodes]; int ssa_var = ssa_op->result_def; diff --git a/ext/opcache/Optimizer/zend_optimizer_internal.h b/ext/opcache/Optimizer/zend_optimizer_internal.h index 0c8c2fe4c7..911eb79e64 100644 --- a/ext/opcache/Optimizer/zend_optimizer_internal.h +++ b/ext/opcache/Optimizer/zend_optimizer_internal.h @@ -71,7 +71,7 @@ typedef struct _zend_optimizer_ctx { target = src; \ } while (0) -static inline zend_bool zend_optimizer_is_loop_var_free(const zend_op *opline) { +static inline bool zend_optimizer_is_loop_var_free(const zend_op *opline) { return (opline->opcode == ZEND_FE_FREE && opline->extended_value != ZEND_FREE_ON_RETURN) || (opline->opcode == ZEND_FREE && opline->extended_value == ZEND_FREE_SWITCH); } @@ -109,12 +109,12 @@ void zend_optimizer_nop_removal(zend_op_array *op_array, zend_optimizer_ctx *ctx void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx *ctx); void zend_optimizer_compact_vars(zend_op_array *op_array); zend_function *zend_optimizer_get_called_func( - zend_script *script, zend_op_array *op_array, zend_op *opline, zend_bool *is_prototype); + zend_script *script, zend_op_array *op_array, zend_op *opline, bool *is_prototype); uint32_t zend_optimizer_classify_function(zend_string *name, uint32_t num_args); void zend_optimizer_migrate_jump(zend_op_array *op_array, zend_op *new_opline, zend_op *opline); void zend_optimizer_shift_jump(zend_op_array *op_array, zend_op *opline, uint32_t *shiftlist); int sccp_optimize_op_array(zend_optimizer_ctx *ctx, zend_op_array *op_arrya, zend_ssa *ssa, zend_call_info **call_map); -int dce_optimize_op_array(zend_op_array *op_array, zend_ssa *ssa, zend_bool reorder_dtor_effects); +int dce_optimize_op_array(zend_op_array *op_array, zend_ssa *ssa, bool reorder_dtor_effects); int zend_ssa_escape_analysis(const zend_script *script, zend_op_array *op_array, zend_ssa *ssa); typedef void (*zend_op_array_func_t)(zend_op_array *, void *context); diff --git a/ext/opcache/Optimizer/zend_ssa.c b/ext/opcache/Optimizer/zend_ssa.c index 3a6a098196..ad3ff7022b 100644 --- a/ext/opcache/Optimizer/zend_ssa.c +++ b/ext/opcache/Optimizer/zend_ssa.c @@ -25,14 +25,14 @@ #include "zend_inference.h" #include "Optimizer/zend_optimizer_internal.h" -static zend_bool dominates(const zend_basic_block *blocks, int a, int b) { +static bool dominates(const zend_basic_block *blocks, int a, int b) { while (blocks[b].level > blocks[a].level) { b = blocks[b].idom; } return a == b; } -static zend_bool will_rejoin( +static bool will_rejoin( const zend_cfg *cfg, const zend_dfg *dfg, const zend_basic_block *block, int other_successor, int exclude, int var) { int i; @@ -58,7 +58,7 @@ static zend_bool will_rejoin( return 0; } -static zend_bool needs_pi(const zend_op_array *op_array, zend_dfg *dfg, zend_ssa *ssa, int from, int to, int var) /* {{{ */ +static bool needs_pi(const zend_op_array *op_array, zend_dfg *dfg, zend_ssa *ssa, int from, int to, int var) /* {{{ */ { zend_basic_block *from_block, *to_block; int other_successor; @@ -1508,7 +1508,7 @@ static void propagate_phi_type_widening(zend_ssa *ssa, int var) /* {{{ */ } /* }}} */ -void zend_ssa_rename_var_uses(zend_ssa *ssa, int old, int new, zend_bool update_types) /* {{{ */ +void zend_ssa_rename_var_uses(zend_ssa *ssa, int old, int new, bool update_types) /* {{{ */ { zend_ssa_var *old_var = &ssa->vars[old]; zend_ssa_var *new_var = &ssa->vars[new]; @@ -1527,7 +1527,7 @@ void zend_ssa_rename_var_uses(zend_ssa *ssa, int old, int new, zend_bool update_ /* If the op already uses the new var, don't add the op to the use * list again. Instead move the use_chain to the correct operand. */ - zend_bool add_to_use_chain = 1; + bool add_to_use_chain = 1; if (ssa_op->result_use == new) { add_to_use_chain = 0; } else if (ssa_op->op1_use == new) { @@ -1579,7 +1579,7 @@ void zend_ssa_rename_var_uses(zend_ssa *ssa, int old, int new, zend_bool update_ /* Update phi use chains */ FOREACH_PHI_USE(old_var, phi) { int j; - zend_bool after_first_new_source = 0; + bool after_first_new_source = 0; /* If the phi already uses the new var, find its use chain, as we may * need to move it to a different source operand. */ diff --git a/ext/opcache/Optimizer/zend_ssa.h b/ext/opcache/Optimizer/zend_ssa.h index a5d6362f47..68f39ad0ec 100644 --- a/ext/opcache/Optimizer/zend_ssa.h +++ b/ext/opcache/Optimizer/zend_ssa.h @@ -25,8 +25,8 @@ typedef struct _zend_ssa_range { zend_long min; zend_long max; - zend_bool underflow; - zend_bool overflow; + bool underflow; + bool overflow; } zend_ssa_range; typedef enum _zend_ssa_negative_lat { @@ -155,7 +155,7 @@ void zend_ssa_remove_instr(zend_ssa *ssa, zend_op *opline, zend_ssa_op *ssa_op); void zend_ssa_remove_phi(zend_ssa *ssa, zend_ssa_phi *phi); void zend_ssa_remove_uses_of_var(zend_ssa *ssa, int var_num); void zend_ssa_remove_block(zend_op_array *op_array, zend_ssa *ssa, int b); -void zend_ssa_rename_var_uses(zend_ssa *ssa, int old_var, int new_var, zend_bool update_types); +void zend_ssa_rename_var_uses(zend_ssa *ssa, int old_var, int new_var, bool update_types); static zend_always_inline void _zend_ssa_remove_def(zend_ssa_var *var) { @@ -215,7 +215,7 @@ static zend_always_inline zend_ssa_phi* zend_ssa_next_use_phi(const zend_ssa *ss return NULL; } -static zend_always_inline zend_bool zend_ssa_is_no_val_use(const zend_op *opline, const zend_ssa_op *ssa_op, int var) +static zend_always_inline bool zend_ssa_is_no_val_use(const zend_op *opline, const zend_ssa_op *ssa_op, int var) { if (opline->opcode == ZEND_ASSIGN || opline->opcode == ZEND_UNSET_CV diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 891863df61..0ebe5a41ae 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -109,12 +109,12 @@ zend_accel_shared_globals *accel_shared_globals = NULL; #ifdef ZEND_WIN32 char accel_uname_id[32]; #endif -zend_bool accel_startup_ok = 0; +bool accel_startup_ok = 0; static char *zps_failure_reason = NULL; char *zps_api_failure_reason = NULL; -zend_bool file_cache_only = 0; /* process uses file cache only */ +bool file_cache_only = 0; /* process uses file cache only */ #if ENABLE_FILE_CACHE_FALLBACK -zend_bool fallback_process = 0; /* process uses file cache fallback */ +bool fallback_process = 0; /* process uses file cache fallback */ #endif static zend_op_array *(*accelerator_orig_compile_file)(zend_file_handle *file_handle, int type); @@ -1278,7 +1278,7 @@ char *accel_make_persistent_key(const char *path, size_t path_length, int *key_l return (char*)path; } -int zend_accel_invalidate(const char *filename, size_t filename_len, zend_bool force) +int zend_accel_invalidate(const char *filename, size_t filename_len, bool force) { zend_string *realpath; zend_persistent_script *persistent_script; @@ -1353,7 +1353,7 @@ static void zend_accel_add_key(const char *key, unsigned int key_length, zend_ac } } -static zend_always_inline zend_bool is_phar_file(zend_string *filename) +static zend_always_inline bool is_phar_file(zend_string *filename) { return filename && ZSTR_LEN(filename) >= sizeof(".phar") && !memcmp(ZSTR_VAL(filename) + ZSTR_LEN(filename) - (sizeof(".phar")-1), ".phar", sizeof(".phar")-1) && @@ -2968,7 +2968,7 @@ static zend_result accel_post_startup(void) size_t shm_size = ZCG(accel_directives).memory_consumption; #ifdef HAVE_JIT size_t jit_size = 0; - zend_bool reattached = 0; + bool reattached = 0; if (JIT_G(enabled) && JIT_G(buffer_size) && zend_jit_check_support() == SUCCESS) { @@ -3138,7 +3138,7 @@ static void accel_post_shutdown(void) void accel_shutdown(void) { zend_ini_entry *ini_entry; - zend_bool _file_cache_only = 0; + bool _file_cache_only = 0; #ifdef HAVE_JIT zend_jit_shutdown(); @@ -3504,7 +3504,7 @@ static void get_unresolved_initializer(zend_class_entry *ce, const char **kind, } ZEND_HASH_FOREACH_END(); } -static zend_bool preload_needed_types_known(zend_class_entry *ce); +static bool preload_needed_types_known(zend_class_entry *ce); static void get_unlinked_dependency(zend_class_entry *ce, const char **kind, const char **name) { zend_class_entry *p; *kind = "Unknown reason"; @@ -3561,9 +3561,9 @@ static void get_unlinked_dependency(zend_class_entry *ce, const char **kind, con } } -static zend_bool preload_try_resolve_constants(zend_class_entry *ce) +static bool preload_try_resolve_constants(zend_class_entry *ce) { - zend_bool ok, changed; + bool ok, changed; zend_class_constant *c; zval *val; @@ -3635,9 +3635,9 @@ static zend_class_entry *preload_fetch_resolved_ce(zend_string *name, zend_class return ce; } -static zend_bool preload_try_resolve_property_types(zend_class_entry *ce) +static bool preload_try_resolve_property_types(zend_class_entry *ce) { - zend_bool ok = 1; + bool ok = 1; if (ce->ce_flags & ZEND_ACC_HAS_TYPE_HINTS) { zend_property_info *prop; ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop) { @@ -3659,7 +3659,7 @@ static zend_bool preload_try_resolve_property_types(zend_class_entry *ce) return ok; } -static zend_bool preload_is_class_type_known(zend_class_entry *ce, zend_string *name) { +static bool preload_is_class_type_known(zend_class_entry *ce, zend_string *name) { if (zend_string_equals_literal_ci(name, "self") || zend_string_equals_literal_ci(name, "parent") || zend_string_equals_ci(name, ce->name)) { @@ -3667,12 +3667,12 @@ static zend_bool preload_is_class_type_known(zend_class_entry *ce, zend_string * } zend_string *lcname = zend_string_tolower(name); - zend_bool known = zend_hash_exists(EG(class_table), lcname); + bool known = zend_hash_exists(EG(class_table), lcname); zend_string_release(lcname); return known; } -static zend_bool preload_is_type_known(zend_class_entry *ce, zend_type *type) { +static bool preload_is_type_known(zend_class_entry *ce, zend_type *type) { zend_type *single_type; ZEND_TYPE_FOREACH(*type, single_type) { if (ZEND_TYPE_HAS_NAME(*single_type)) { @@ -3684,7 +3684,7 @@ static zend_bool preload_is_type_known(zend_class_entry *ce, zend_type *type) { return 1; } -static zend_bool preload_is_method_maybe_override(zend_class_entry *ce, zend_string *lcname) { +static bool preload_is_method_maybe_override(zend_class_entry *ce, zend_string *lcname) { zend_class_entry *p; if (ce->trait_aliases || ce->trait_precedences) { return 1; @@ -3722,7 +3722,7 @@ static zend_bool preload_is_method_maybe_override(zend_class_entry *ce, zend_str return 0; } -static zend_bool preload_needed_types_known(zend_class_entry *ce) { +static bool preload_needed_types_known(zend_class_entry *ce) { zend_function *fptr; zend_string *lcname; ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->function_table, lcname, fptr) { @@ -3749,7 +3749,7 @@ static void preload_link(void) zend_persistent_script *script; zend_class_entry *ce, *parent, *p; zend_string *key; - zend_bool found, changed; + bool found, changed; uint32_t i; dtor_func_t orig_dtor; zend_function *function; @@ -4052,7 +4052,7 @@ static zend_string *preload_resolve_path(zend_string *filename) static void preload_remove_empty_includes(void) { zend_persistent_script *script; - zend_bool changed; + bool changed; /* mark all as empty */ ZEND_HASH_FOREACH_PTR(preload_scripts, script) { @@ -4359,7 +4359,7 @@ static zend_result preload_autoload(zend_string *filename) zend_op_array *op_array; zend_execute_data *old_execute_data; zend_class_entry *old_fake_scope; - zend_bool do_bailout = 0; + bool do_bailout = 0; int ret = SUCCESS; if (zend_hash_exists(&EG(included_files), filename)) { @@ -4422,7 +4422,7 @@ static zend_result preload_autoload(zend_string *filename) return ret; } -static int accel_preload(const char *config, zend_bool in_child) +static int accel_preload(const char *config, bool in_child) { zend_file_handle file_handle; int ret; @@ -4795,7 +4795,7 @@ static int accel_finish_startup(void) size_t (*orig_ub_write)(const char *str, size_t str_length) = sapi_module.ub_write; void (*orig_flush)(void *server_context) = sapi_module.flush; #ifdef ZEND_SIGNALS - zend_bool old_reset_signals = SIGG(reset); + bool old_reset_signals = SIGG(reset); #endif if (UNEXPECTED(file_cache_only)) { @@ -4901,7 +4901,7 @@ static int accel_finish_startup(void) EG(error_reporting) = orig_error_reporting; if (rc == SUCCESS) { - zend_bool orig_report_memleaks; + bool orig_report_memleaks; /* don't send headers */ SG(headers_sent) = 1; diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index 08e4a7f407..1d151b982e 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -121,9 +121,9 @@ typedef struct _zend_persistent_script { zend_long compiler_halt_offset; /* position of __HALT_COMPILER or -1 */ int ping_auto_globals_mask; /* which autoglobals are used by the script */ accel_time_t timestamp; /* the script modification time */ - zend_bool corrupted; - zend_bool is_phar; - zend_bool empty; + bool corrupted; + bool is_phar; + bool empty; uint32_t num_warnings; zend_recorded_warning **warnings; @@ -155,18 +155,18 @@ typedef struct _zend_accel_directives { char *user_blacklist_filename; zend_long consistency_checks; zend_long force_restart_timeout; - zend_bool use_cwd; - zend_bool ignore_dups; - zend_bool validate_timestamps; - zend_bool revalidate_path; - zend_bool save_comments; - zend_bool record_warnings; - zend_bool protect_memory; - zend_bool file_override_enabled; - zend_bool enable_cli; - zend_bool validate_permission; + bool use_cwd; + bool ignore_dups; + bool validate_timestamps; + bool revalidate_path; + bool save_comments; + bool record_warnings; + bool protect_memory; + bool file_override_enabled; + bool enable_cli; + bool validate_permission; #ifndef ZEND_WIN32 - zend_bool validate_root; + bool validate_root; #endif zend_ulong revalidate_freq; zend_ulong file_update_protection; @@ -186,13 +186,13 @@ typedef struct _zend_accel_directives { char *lockfile_path; #endif char *file_cache; - zend_bool file_cache_only; - zend_bool file_cache_consistency_checks; + bool file_cache_only; + bool file_cache_consistency_checks; #if ENABLE_FILE_CACHE_FALLBACK - zend_bool file_cache_fallback; + bool file_cache_fallback; #endif #ifdef HAVE_HUGE_CODE_PAGES - zend_bool huge_code_pages; + bool huge_code_pages; #endif char *preload; #ifndef ZEND_WIN32 @@ -205,10 +205,10 @@ typedef struct _zend_accel_directives { typedef struct _zend_accel_globals { int counted; /* the process uses shared memory */ - zend_bool enabled; - zend_bool locked; /* thread obtained exclusive lock */ - zend_bool accelerator_enabled; /* accelerator enabled for current request */ - zend_bool pcre_reseted; + bool enabled; + bool locked; /* thread obtained exclusive lock */ + bool accelerator_enabled; /* accelerator enabled for current request */ + bool pcre_reseted; zend_accel_directives accel_directives; zend_string *cwd; /* current working directory or NULL */ zend_string *include_path; /* current value of "include_path" directive */ @@ -229,9 +229,9 @@ typedef struct _zend_accel_globals { void *mem; void *arena_mem; zend_persistent_script *current_persistent_script; - zend_bool is_immutable_class; + bool is_immutable_class; /* Temporary storage for warnings before they are moved into persistent_script. */ - zend_bool record_warnings; + bool record_warnings; uint32_t num_warnings; zend_recorded_warning **warnings; /* cache to save hash lookup on the same INCLUDE opcode */ @@ -267,15 +267,15 @@ typedef struct _zend_accel_shared_globals { time_t start_time; time_t last_restart_time; time_t force_restart_time; - zend_bool accelerator_enabled; - zend_bool restart_pending; + bool accelerator_enabled; + bool restart_pending; zend_accel_restart_reason restart_reason; - zend_bool cache_status_before_restart; + bool cache_status_before_restart; #ifdef ZEND_WIN32 LONGLONG mem_usage; LONGLONG restart_in; #endif - zend_bool restart_in_progress; + bool restart_in_progress; /* Preloading */ zend_persistent_script *preload_script; @@ -291,10 +291,10 @@ typedef struct _zend_accel_shared_globals { #ifdef ZEND_WIN32 extern char accel_uname_id[32]; #endif -extern zend_bool accel_startup_ok; -extern zend_bool file_cache_only; +extern bool accel_startup_ok; +extern bool file_cache_only; #if ENABLE_FILE_CACHE_FALLBACK -extern zend_bool fallback_process; +extern bool fallback_process; #endif extern zend_accel_shared_globals *accel_shared_globals; @@ -321,7 +321,7 @@ void zend_accel_schedule_restart_if_necessary(zend_accel_restart_reason reason); accel_time_t zend_get_file_handle_timestamp(zend_file_handle *file_handle, size_t *size); int validate_timestamp_and_record(zend_persistent_script *persistent_script, zend_file_handle *file_handle); int validate_timestamp_and_record_ex(zend_persistent_script *persistent_script, zend_file_handle *file_handle); -int zend_accel_invalidate(const char *filename, size_t filename_len, zend_bool force); +int zend_accel_invalidate(const char *filename, size_t filename_len, bool force); int accelerator_shm_read_lock(void); void accelerator_shm_read_unlock(void); diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index a983a818a9..518ffc0bc1 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -124,14 +124,14 @@ static uint32_t zend_jit_trace_get_exit_point(const zend_op *to_opline, uint32_t static const void *zend_jit_trace_get_exit_addr(uint32_t n); static void zend_jit_trace_add_code(const void *start, uint32_t size); -static zend_bool dominates(const zend_basic_block *blocks, int a, int b) { +static bool dominates(const zend_basic_block *blocks, int a, int b) { while (blocks[b].level > blocks[a].level) { b = blocks[b].idom; } return a == b; } -static zend_bool zend_ssa_is_last_use(const zend_op_array *op_array, const zend_ssa *ssa, int var, int use) +static bool zend_ssa_is_last_use(const zend_op_array *op_array, const zend_ssa *ssa, int var, int use) { int next_use; @@ -165,7 +165,7 @@ static zend_bool zend_ssa_is_last_use(const zend_op_array *op_array, const zend_ return 0; } -static zend_bool zend_ival_is_last_use(const zend_lifetime_interval *ival, int use) +static bool zend_ival_is_last_use(const zend_lifetime_interval *ival, int use) { if (ival->flags & ZREG_LAST_USE) { const zend_life_range *range = &ival->range; @@ -178,7 +178,7 @@ static zend_bool zend_ival_is_last_use(const zend_lifetime_interval *ival, int u return 0; } -static zend_bool zend_is_commutative(zend_uchar opcode) +static bool zend_is_commutative(zend_uchar opcode) { return opcode == ZEND_ADD || @@ -188,7 +188,7 @@ static zend_bool zend_is_commutative(zend_uchar opcode) opcode == ZEND_BW_XOR; } -static zend_bool zend_long_is_power_of_two(zend_long x) +static bool zend_long_is_power_of_two(zend_long x) { return (x > 0) && !(x & (x - 1)); } @@ -1044,7 +1044,7 @@ static int zend_jit_compute_block_order(zend_ssa *ssa, int *block_order) return end - block_order; } -static zend_bool zend_jit_in_loop(zend_ssa *ssa, int header, zend_basic_block *b) +static bool zend_jit_in_loop(zend_ssa *ssa, int header, zend_basic_block *b) { while (b->loop_header >= 0) { if (b->loop_header == header) { @@ -1435,7 +1435,7 @@ static uint32_t zend_interval_end(zend_lifetime_interval *ival) return range->end; } -static zend_bool zend_interval_covers(zend_lifetime_interval *ival, uint32_t position) +static bool zend_interval_covers(zend_lifetime_interval *ival, uint32_t position) { zend_life_range *range = &ival->range; @@ -1997,7 +1997,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array ((intervals[i]->flags & ZREG_LOAD) || ((intervals[i]->flags & ZREG_STORE) && ssa->vars[i].definition >= 0)) && ssa->vars[i].use_chain < 0) { - zend_bool may_remove = 1; + bool may_remove = 1; zend_ssa_phi *phi = ssa->vars[i].phi_use_chain; while (phi) { @@ -2020,7 +2020,7 @@ static zend_lifetime_interval** zend_jit_allocate_registers(const zend_op_array (intervals[i]->flags & ZREG_STORE) && (ssa->vars[i].use_chain < 0 || zend_ssa_next_use(ssa->ops, i, ssa->vars[i].use_chain) < 0)) { - zend_bool may_remove = 1; + bool may_remove = 1; zend_ssa_phi *phi = ssa->vars[i].phi_use_chain; while (phi) { @@ -2070,14 +2070,14 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op int call_level = 0; void *checkpoint = NULL; zend_lifetime_interval **ra = NULL; - zend_bool is_terminated = 1; /* previous basic block is terminated by jump */ - zend_bool recv_emitted = 0; /* emitted at least one RECV opcode */ + bool is_terminated = 1; /* previous basic block is terminated by jump */ + bool recv_emitted = 0; /* emitted at least one RECV opcode */ zend_uchar smart_branch_opcode; uint32_t target_label, target_label2; uint32_t op1_info, op1_def_info, op2_info, res_info, res_use_info; zend_jit_addr op1_addr, op1_def_addr, op2_addr, op2_def_addr, res_addr; zend_class_entry *ce; - zend_bool ce_is_instanceof; + bool ce_is_instanceof; if (JIT_G(bisect_limit)) { jit_bisect_pos++; @@ -2932,7 +2932,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op } } else { int j; - zend_bool left_frame = 0; + bool left_frame = 0; if (!zend_jit_return(&dasm_state, opline, op_array, op1_info, OP1_REG_ADDR())) { @@ -3629,7 +3629,7 @@ static void ZEND_FASTCALL zend_runtime_jit(void) /* JIT-ed code is going to be called by VM */ } -void zend_jit_check_funcs(HashTable *function_table, zend_bool is_method) { +void zend_jit_check_funcs(HashTable *function_table, bool is_method) { zend_op *opline; zend_function *func; zend_op_array *op_array; @@ -4200,7 +4200,7 @@ ZEND_EXT_API int zend_jit_check_support(void) return SUCCESS; } -ZEND_EXT_API int zend_jit_startup(void *buf, size_t size, zend_bool reattached) +ZEND_EXT_API int zend_jit_startup(void *buf, size_t size, bool reattached) { int ret; diff --git a/ext/opcache/jit/zend_jit.h b/ext/opcache/jit/zend_jit.h index fffac1edc2..0d71efa470 100644 --- a/ext/opcache/jit/zend_jit.h +++ b/ext/opcache/jit/zend_jit.h @@ -81,8 +81,8 @@ typedef struct _zend_jit_trace_stack_frame zend_jit_trace_stack_frame; typedef struct _sym_node zend_sym_node; typedef struct _zend_jit_globals { - zend_bool enabled; - zend_bool on; + bool enabled; + bool on; uint8_t trigger; uint8_t opt_level; uint32_t opt_flags; @@ -108,7 +108,7 @@ typedef struct _zend_jit_globals { zend_sym_node *symbols; /* symbols for disassembler */ - zend_bool tracing; + bool tracing; zend_jit_trace_rec *current_trace; zend_jit_trace_stack_frame *current_frame; @@ -137,7 +137,7 @@ ZEND_EXT_API void zend_jit_init(void); ZEND_EXT_API int zend_jit_config(zend_string *jit_options, int stage); ZEND_EXT_API int zend_jit_debug_config(zend_long old_val, zend_long new_val, int stage); ZEND_EXT_API int zend_jit_check_support(void); -ZEND_EXT_API int zend_jit_startup(void *jit_buffer, size_t size, zend_bool reattached); +ZEND_EXT_API int zend_jit_startup(void *jit_buffer, size_t size, bool reattached); ZEND_EXT_API void zend_jit_shutdown(void); ZEND_EXT_API void zend_jit_activate(void); ZEND_EXT_API void zend_jit_deactivate(void); diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 02fedbdcad..696013f60f 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -1373,7 +1373,7 @@ check_indirect: return ref; } -static zend_always_inline zend_bool zend_jit_verify_type_common(zval *arg, zend_arg_info *arg_info, void **cache_slot) +static zend_always_inline bool zend_jit_verify_type_common(zval *arg, zend_arg_info *arg_info, void **cache_slot) { uint32_t type_mask; @@ -1431,12 +1431,12 @@ builtin_types: return 0; } -static zend_bool ZEND_FASTCALL zend_jit_verify_arg_slow(zval *arg, zend_arg_info *arg_info) +static bool ZEND_FASTCALL zend_jit_verify_arg_slow(zval *arg, zend_arg_info *arg_info) { zend_execute_data *execute_data = EG(current_execute_data); const zend_op *opline = EX(opline); void **cache_slot = CACHE_ADDR(opline->extended_value); - zend_bool ret; + bool ret; ret = zend_jit_verify_type_common(arg, arg_info, cache_slot); if (UNEXPECTED(!ret)) { @@ -1569,12 +1569,12 @@ static void ZEND_FASTCALL zend_jit_fetch_obj_is_dynamic(zend_object *zobj, intpt zend_jit_fetch_obj_is_slow(zobj); } -static zend_always_inline zend_bool promotes_to_array(zval *val) { +static zend_always_inline bool promotes_to_array(zval *val) { return Z_TYPE_P(val) <= IS_FALSE || (Z_ISREF_P(val) && Z_TYPE_P(Z_REFVAL_P(val)) <= IS_FALSE); } -static zend_always_inline zend_bool check_type_array_assignable(zend_type type) { +static zend_always_inline bool check_type_array_assignable(zend_type type) { if (!ZEND_TYPE_IS_SET(type)) { return 1; } @@ -1616,7 +1616,7 @@ static zend_never_inline ZEND_COLD void zend_throw_access_uninit_prop_by_ref_err zend_get_unmangled_property_name(prop->name)); } -static zend_never_inline zend_bool zend_handle_fetch_obj_flags( +static zend_never_inline bool zend_handle_fetch_obj_flags( zval *result, zval *ptr, zend_object *obj, zend_property_info *prop_info, uint32_t flags) { switch (flags) { @@ -1799,7 +1799,7 @@ static zend_property_info *zend_jit_get_prop_not_accepting_double(zend_reference return NULL; } -static ZEND_COLD void zend_jit_throw_incdec_ref_error(zend_reference *ref, zend_bool inc) +static ZEND_COLD void zend_jit_throw_incdec_ref_error(zend_reference *ref, bool inc) { zend_property_info *error_prop = zend_jit_get_prop_not_accepting_double(ref); /* Currently there should be no way for a typed reference to accept both int and double. diff --git a/ext/opcache/jit/zend_jit_internal.h b/ext/opcache/jit/zend_jit_internal.h index 917fa10f2e..906262773f 100644 --- a/ext/opcache/jit/zend_jit_internal.h +++ b/ext/opcache/jit/zend_jit_internal.h @@ -128,7 +128,7 @@ ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_jit_func_counter_helper(ZEND_OPCODE_H ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_jit_loop_counter_helper(ZEND_OPCODE_HANDLER_ARGS); void ZEND_FASTCALL zend_jit_copy_extra_args_helper(EXECUTE_DATA_D); -zend_bool ZEND_FASTCALL zend_jit_deprecated_helper(OPLINE_D); +bool ZEND_FASTCALL zend_jit_deprecated_helper(OPLINE_D); zend_constant* ZEND_FASTCALL zend_jit_get_constant(const zval *key, uint32_t flags); zend_constant* ZEND_FASTCALL zend_jit_check_constant(const zval *key); @@ -484,7 +484,7 @@ int ZEND_FASTCALL zend_jit_trace_hot_root(zend_execute_data *execute_data, const int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf *regs); zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *execute_data, const zend_op *opline, zend_jit_trace_rec *trace_buffer, uint8_t start, uint32_t is_megamorphc); -static zend_always_inline const zend_op* zend_jit_trace_get_exit_opline(zend_jit_trace_rec *trace, const zend_op *opline, zend_bool *exit_if_true) +static zend_always_inline const zend_op* zend_jit_trace_get_exit_opline(zend_jit_trace_rec *trace, const zend_op *opline, bool *exit_if_true) { if (trace->op == ZEND_JIT_TRACE_VM || trace->op == ZEND_JIT_TRACE_END) { if (trace->opline == opline + 1) { @@ -505,7 +505,7 @@ static zend_always_inline const zend_op* zend_jit_trace_get_exit_opline(zend_jit return NULL; } -static zend_always_inline zend_bool zend_jit_may_be_polymorphic_call(const zend_op *opline) +static zend_always_inline bool zend_jit_may_be_polymorphic_call(const zend_op *opline) { if (opline->opcode == ZEND_INIT_FCALL || opline->opcode == ZEND_INIT_FCALL_BY_NAME diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 69c4f79fa8..d0ca0e911d 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -2423,7 +2423,7 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace if (p->op == ZEND_JIT_TRACE_VM) { const zend_op *opline = p->opline; int len; - zend_bool support_opline; + bool support_opline; support_opline = zend_jit_opline_supports_reg(op_array, ssa, opline, ssa_op, p); @@ -3085,7 +3085,7 @@ static void zend_jit_trace_setup_ret_counter(const zend_op *opline, size_t offse } } -static zend_bool zend_jit_may_delay_fetch_this(zend_ssa *ssa, const zend_op **ssa_opcodes, int var) +static bool zend_jit_may_delay_fetch_this(zend_ssa *ssa, const zend_op **ssa_opcodes, int var) { int i; int use = ssa->vars[var].use_chain; @@ -3176,11 +3176,11 @@ static int zend_jit_trace_deoptimization(dasm_State **Dst, zend_ssa *ssa, zend_jit_trace_stack *stack, zend_lifetime_interval **ra, - zend_bool polymorphic_side_trace) + bool polymorphic_side_trace) { int i; - zend_bool has_constants = 0; - zend_bool has_unsaved_vars = 0; + bool has_constants = 0; + bool has_unsaved_vars = 0; // TODO: Merge this loop with the following register LOAD loop to implement parallel move ??? for (i = 0; i < parent_vars_count; i++) { @@ -3317,7 +3317,7 @@ static void zend_jit_trace_set_var_range(zend_ssa_var_info *info, zend_long min, info->range.overflow = 0; } -static void zend_jit_trace_update_condition_ranges(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, zend_bool exit_if_true) +static void zend_jit_trace_update_condition_ranges(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, bool exit_if_true) { zend_long op1_min, op1_max, op2_min, op2_max; @@ -3435,7 +3435,7 @@ static void zend_jit_trace_update_condition_ranges(const zend_op *opline, const } } -static zend_bool zend_jit_may_skip_comparison(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_ssa *ssa, const zend_op **ssa_opcodes) +static bool zend_jit_may_skip_comparison(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_ssa *ssa, const zend_op **ssa_opcodes) { zend_uchar prev_opcode; @@ -3537,14 +3537,14 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par zend_uchar smart_branch_opcode; const void *exit_addr; uint32_t op1_info, op1_def_info, op2_info, res_info, res_use_info, op1_data_info; - zend_bool send_result = 0; - zend_bool skip_comparison; + bool send_result = 0; + bool skip_comparison; zend_jit_addr op1_addr, op1_def_addr, op2_addr, op2_def_addr, res_addr; zend_class_entry *ce; - zend_bool ce_is_instanceof; - zend_bool delayed_fetch_this = 0; - zend_bool avoid_refcounting = 0; - zend_bool polymorphic_side_trace = + bool ce_is_instanceof; + bool delayed_fetch_this = 0; + bool avoid_refcounting = 0; + bool polymorphic_side_trace = parent_trace && (zend_jit_traces[parent_trace].exit_info[exit_num].flags & ZEND_JIT_EXIT_METHOD_CALL); uint32_t i; @@ -3817,7 +3817,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par uint8_t op3_type = p->op3_type; uint8_t orig_op1_type = op1_type; uint8_t orig_op2_type = op2_type; - zend_bool op1_indirect; + bool op1_indirect; zend_class_entry *op1_ce = NULL; zend_class_entry *op2_ce = NULL; @@ -4773,7 +4773,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par CHECK_OP1_TRACE_TYPE(); CHECK_OP2_TRACE_TYPE(); if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); uint32_t exit_point; @@ -4821,7 +4821,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par CHECK_OP1_TRACE_TYPE(); CHECK_OP2_TRACE_TYPE(); if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); uint32_t exit_point; @@ -4861,7 +4861,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par goto done; case ZEND_DEFINED: if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); uint32_t exit_point = zend_jit_trace_get_exit_point(exit_opline, 0); @@ -4885,7 +4885,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } op1_info = OP1_INFO(); if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); uint32_t exit_point; @@ -4925,7 +4925,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } else { int j; int may_throw = 0; - zend_bool left_frame = 0; + bool left_frame = 0; if (!zend_jit_return(&dasm_state, opline, op_array, op1_info, OP1_REG_ADDR())) { @@ -5081,7 +5081,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par CHECK_OP1_TRACE_TYPE(); } if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); uint32_t exit_point = zend_jit_trace_get_exit_point(exit_opline, 0); @@ -5111,7 +5111,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par break; } if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); uint32_t exit_point = zend_jit_trace_get_exit_point(exit_opline, 0); @@ -5274,7 +5274,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par op2_info = OP2_INFO(); CHECK_OP2_TRACE_TYPE(); if ((opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; const zend_op *exit_opline = zend_jit_trace_get_exit_opline(p + 1, opline + 1, &exit_if_true); uint32_t exit_point; @@ -6408,7 +6408,7 @@ static const void *zend_jit_trace_exit_to_vm(uint32_t trace_num, uint32_t exit_n const zend_op *opline; uint32_t stack_size; zend_jit_trace_stack *stack; - zend_bool original_handler = 0; + bool original_handler = 0; if (!zend_jit_trace_exit_needs_deoptimization(trace_num, exit_num)) { return dasm_labels[zend_lbtrace_escape]; @@ -6589,7 +6589,7 @@ static void zend_jit_blacklist_root_trace(const zend_op *opline, size_t offset) zend_shared_alloc_unlock(); } -static zend_bool zend_jit_trace_is_bad_root(const zend_op *opline, zend_jit_trace_stop stop, size_t offset) +static bool zend_jit_trace_is_bad_root(const zend_op *opline, zend_jit_trace_stop stop, size_t offset) { const zend_op **cache_opline = JIT_G(bad_root_cache_opline); uint8_t *cache_count = JIT_G(bad_root_cache_count); @@ -7054,7 +7054,7 @@ static void zend_jit_blacklist_trace_exit(uint32_t trace_num, uint32_t exit_num) zend_shared_alloc_unlock(); } -static zend_bool zend_jit_trace_exit_is_bad(uint32_t trace_num, uint32_t exit_num) +static bool zend_jit_trace_exit_is_bad(uint32_t trace_num, uint32_t exit_num) { uint8_t *counter = JIT_G(exit_counters) + zend_jit_traces[trace_num].exit_counters + exit_num; @@ -7066,7 +7066,7 @@ static zend_bool zend_jit_trace_exit_is_bad(uint32_t trace_num, uint32_t exit_nu return 0; } -static zend_bool zend_jit_trace_exit_is_hot(uint32_t trace_num, uint32_t exit_num) +static bool zend_jit_trace_exit_is_hot(uint32_t trace_num, uint32_t exit_num) { uint8_t *counter = JIT_G(exit_counters) + zend_jit_traces[trace_num].exit_counters + exit_num; diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index d919b59c9e..9a7b205340 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -161,7 +161,7 @@ void ZEND_FASTCALL zend_jit_copy_extra_args_helper(EXECUTE_DATA_D) } } -zend_bool ZEND_FASTCALL zend_jit_deprecated_helper(OPLINE_D) +bool ZEND_FASTCALL zend_jit_deprecated_helper(OPLINE_D) { zend_execute_data *call = (zend_execute_data *) opline; zend_function *fbc = call->func; diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 0d1b1e40e6..6b41366ac5 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -1628,12 +1628,12 @@ static void* dasm_labels[zend_lb_MAX]; || } |.endmacro -static zend_bool reuse_ip = 0; -static zend_bool delayed_call_chain = 0; +static bool reuse_ip = 0; +static bool delayed_call_chain = 0; static uint32_t delayed_call_level = 0; static const zend_op *last_valid_opline = NULL; -static zend_bool use_last_vald_opline = 0; -static zend_bool track_last_valid_opline = 0; +static bool use_last_vald_opline = 0; +static bool track_last_valid_opline = 0; static int jit_return_label = -1; static uint32_t current_trace_num = 0; static uint32_t allowed_opt_flags = 0; @@ -1652,7 +1652,7 @@ static void zend_jit_use_last_valid_opline(void) } } -static zend_bool zend_jit_trace_uses_initial_ip(void) +static bool zend_jit_trace_uses_initial_ip(void) { return use_last_vald_opline; } @@ -1716,12 +1716,12 @@ static uint32_t floor_log2(uint32_t x) return ones32(x) - 1; } -static zend_bool is_power_of_two(uint32_t x) +static bool is_power_of_two(uint32_t x) { return !(x & (x - 1)) && x != 0; } -static zend_bool has_concrete_type(uint32_t value_type) +static bool has_concrete_type(uint32_t value_type) { return is_power_of_two (value_type & (MAY_BE_ANY|MAY_BE_UNDEF)); } @@ -1731,7 +1731,7 @@ static uint32_t concrete_type(uint32_t value_type) return floor_log2(value_type & (MAY_BE_ANY|MAY_BE_UNDEF)); } -static inline zend_bool is_signed(double d) +static inline bool is_signed(double d) { return (((unsigned char*)&d)[sizeof(double)-1] & 0x80) != 0; } @@ -2651,7 +2651,7 @@ static int zend_jit_assign_to_variable(dasm_State **Dst, zend_jit_addr val_addr, uint32_t val_info, zend_jit_addr res_addr, - zend_bool check_exception); + bool check_exception); static int zend_jit_assign_const_stub(dasm_State **Dst) { @@ -3397,7 +3397,7 @@ static int zend_jit_trace_link_to_root(dasm_State **Dst, zend_jit_trace_info *t, return 1; } -static int zend_jit_trace_return(dasm_State **Dst, zend_bool original_handler) +static int zend_jit_trace_return(dasm_State **Dst, bool original_handler) { #if 0 | jmp ->trace_escape @@ -3549,7 +3549,7 @@ static int zend_jit_trace_handler(dasm_State **Dst, const zend_op_array *op_arra zend_jit_trace_stack *stack = JIT_G(current_frame)->stack; if (zend_is_smart_branch(opline)) { - zend_bool exit_if_true = 0; + bool exit_if_true = 0; exit_opline = zend_jit_trace_get_exit_opline(trace, opline + 1, &exit_if_true); } else { switch (opline->opcode) { @@ -3756,7 +3756,7 @@ static int zend_jit_call(dasm_State **Dst, const zend_op *opline, unsigned int n #endif } -static int zend_jit_spill_store(dasm_State **Dst, zend_jit_addr src, zend_jit_addr dst, uint32_t info, zend_bool set_type) +static int zend_jit_spill_store(dasm_State **Dst, zend_jit_addr src, zend_jit_addr dst, uint32_t info, bool set_type) { ZEND_ASSERT(Z_MODE(src) == IS_REG); ZEND_ASSERT(Z_MODE(dst) == IS_MEM_ZVAL); @@ -3792,7 +3792,7 @@ static int zend_jit_load_reg(dasm_State **Dst, zend_jit_addr src, zend_jit_addr return 1; } -static int zend_jit_store_var(dasm_State **Dst, uint32_t info, int var, zend_reg reg, zend_bool set_type) +static int zend_jit_store_var(dasm_State **Dst, uint32_t info, int var, zend_reg reg, bool set_type) { zend_jit_addr src = ZEND_ADDR_REG(reg); zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, EX_NUM_TO_VAR(var)); @@ -3813,7 +3813,7 @@ static int zend_jit_store_var_if_necessary_ex(dasm_State **Dst, int var, zend_ji { if (Z_MODE(src) == IS_REG && Z_STORE(src)) { zend_jit_addr dst = ZEND_ADDR_MEM_ZVAL(ZREG_FP, var); - zend_bool set_type = 1; + bool set_type = 1; if ((info & (MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF)) == (old_info & (MAY_BE_ANY|MAY_BE_REF|MAY_BE_UNDEF))) { @@ -4210,7 +4210,7 @@ static int zend_jit_math_long_long(dasm_State **Dst, uint32_t res_use_info, int may_overflow) { - zend_bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); + bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); zend_reg result_reg; zend_reg tmp_reg = ZREG_R0; @@ -4520,7 +4520,7 @@ static int zend_jit_math_double_double(dasm_State **Dst, zend_jit_addr res_addr, uint32_t res_use_info) { - zend_bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); + bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); zend_reg result_reg; if (Z_MODE(res_addr) == IS_REG) { @@ -4611,7 +4611,7 @@ static int zend_jit_math_helper(dasm_State **Dst, int may_throw) /* Labels: 1,2,3,4,5,6 */ { - zend_bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); + bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); if ((op1_info & MAY_BE_LONG) && (op2_info & MAY_BE_LONG)) { if (op1_info & (MAY_BE_ANY-MAY_BE_LONG)) { @@ -4864,7 +4864,7 @@ static int zend_jit_long_math_helper(dasm_State **Dst, int may_throw) /* Labels: 6 */ { - zend_bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); + bool same_ops = zend_jit_same_addr(op1_addr, op2_addr); zend_reg result_reg; zval tmp; @@ -5283,8 +5283,8 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o } if (op2_info & MAY_BE_LONG) { - zend_bool op2_loaded = 0; - zend_bool packed_loaded = 0; + bool op2_loaded = 0; + bool packed_loaded = 0; if (op2_info & ((MAY_BE_ANY|MAY_BE_UNDEF) - MAY_BE_LONG)) { | // if (EXPECTED(Z_TYPE_P(dim) == IS_LONG)) @@ -5885,7 +5885,7 @@ static int zend_jit_assign_to_typed_ref(dasm_State **Dst, const zend_op *opline, zend_uchar val_type, zend_jit_addr val_addr, - zend_bool check_exception) + bool check_exception) { | // if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(Z_REF_P(variable_ptr)))) { | cmp aword [FCARG1a + offsetof(zend_reference, sources.ptr)], 0 @@ -5932,7 +5932,7 @@ static int zend_jit_assign_to_variable_call(dasm_State **Dst, zend_jit_addr val_addr, uint32_t val_info, zend_jit_addr __res_addr, - zend_bool __check_exception) + bool __check_exception) { if (Z_MODE(var_addr) != IS_MEM_ZVAL || Z_REG(var_addr) != ZREG_FCARG1a || Z_OFFSET(var_addr) != 0) { | LOAD_ZVAL_ADDR FCARG1a, var_addr @@ -5978,7 +5978,7 @@ static int zend_jit_assign_to_variable(dasm_State **Dst, zend_jit_addr val_addr, uint32_t val_info, zend_jit_addr res_addr, - zend_bool check_exception) + bool check_exception) /* Labels: 1,2,3,4,5,8 */ { int done = 0; @@ -6019,7 +6019,7 @@ static int zend_jit_assign_to_variable(dasm_State **Dst, in_cold = 1; } if (Z_REG(var_use_addr) == ZREG_FCARG1a || Z_REG(var_use_addr) == ZREG_R0) { - zend_bool keep_gc = 0; + bool keep_gc = 0; | GET_ZVAL_PTR Ra(tmp_reg), var_use_addr if (tmp_reg == ZREG_FCARG1a) { @@ -6642,7 +6642,7 @@ static int zend_jit_is_constant_cmp_long_long(const zend_op *opline, zend_jit_addr op1_addr, zend_ssa_range *op2_range, zend_jit_addr op2_addr, - zend_bool *result) + bool *result) { zend_long op1_min; zend_long op1_max; @@ -6727,10 +6727,10 @@ static int zend_jit_cmp_long_long(dasm_State **Dst, uint32_t target_label, uint32_t target_label2, const void *exit_addr, - zend_bool skip_comparison) + bool skip_comparison) { - zend_bool swap = 0; - zend_bool result; + bool swap = 0; + bool result; if (zend_jit_is_constant_cmp_long_long(opline, op1_range, op1_addr, op2_range, op2_addr, &result)) { if (!smart_branch_opcode || @@ -7021,7 +7021,7 @@ static int zend_jit_cmp_long_long(dasm_State **Dst, return 1; } -static int zend_jit_cmp_double_common(dasm_State **Dst, const zend_op *opline, zend_jit_addr res_addr, zend_bool swap, zend_uchar smart_branch_opcode, uint32_t target_label, uint32_t target_label2, const void *exit_addr) +static int zend_jit_cmp_double_common(dasm_State **Dst, const zend_op *opline, zend_jit_addr res_addr, bool swap, zend_uchar smart_branch_opcode, uint32_t target_label, uint32_t target_label2, const void *exit_addr) { if (smart_branch_opcode) { if (smart_branch_opcode == ZEND_JMPZ) { @@ -7380,7 +7380,7 @@ static int zend_jit_cmp_double_long(dasm_State **Dst, const zend_op *opline, zen static int zend_jit_cmp_double_double(dasm_State **Dst, const zend_op *opline, zend_jit_addr op1_addr, zend_jit_addr op2_addr, zend_jit_addr res_addr, zend_uchar smart_branch_opcode, uint32_t target_label, uint32_t target_label2, const void *exit_addr) { - zend_bool swap = 0; + bool swap = 0; if (Z_MODE(op1_addr) == IS_REG) { | SSE_AVX_OP ucomisd, vucomisd, Z_REG(op1_addr), op2_addr @@ -7556,10 +7556,10 @@ static int zend_jit_cmp(dasm_State **Dst, uint32_t target_label, uint32_t target_label2, const void *exit_addr, - zend_bool skip_comparison) + bool skip_comparison) { - zend_bool same_ops = (opline->op1_type == opline->op2_type) && (opline->op1.var == opline->op2.var); - zend_bool has_slow; + bool same_ops = (opline->op1_type == opline->op2_type) && (opline->op1.var == opline->op2.var); + bool has_slow; has_slow = (op1_info & (MAY_BE_LONG|MAY_BE_DOUBLE)) && @@ -7795,7 +7795,7 @@ static int zend_jit_identical(dasm_State **Dst, uint32_t target_label, uint32_t target_label2, const void *exit_addr, - zend_bool skip_comparison) + bool skip_comparison) { uint32_t identical_label = (uint32_t)-1; uint32_t not_identical_label = (uint32_t)-1; @@ -8171,10 +8171,10 @@ static int zend_jit_bool_jmpznz(dasm_State **Dst, const zend_op *opline, uint32_ { uint32_t true_label = -1; uint32_t false_label = -1; - zend_bool set_bool = 0; - zend_bool set_bool_not = 0; - zend_bool set_delayed = 0; - zend_bool jmp_done = 0; + bool set_bool = 0; + bool set_bool_not = 0; + bool set_delayed = 0; + bool jmp_done = 0; if (branch_opcode == ZEND_BOOL) { set_bool = 1; @@ -8715,7 +8715,7 @@ static int zend_jit_stack_check(dasm_State **Dst, const zend_op *opline, uint32_ return 1; } -static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, zend_function *func, zend_bool is_closure, zend_bool use_this, zend_bool stack_check) +static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, zend_function *func, bool is_closure, bool use_this, bool stack_check) { uint32_t used_stack; @@ -9153,7 +9153,7 @@ static int zend_jit_init_fcall_guard(dasm_State **Dst, uint32_t level, const zen return 1; } -static int zend_jit_init_fcall(dasm_State **Dst, const zend_op *opline, uint32_t b, const zend_op_array *op_array, zend_ssa *ssa, const zend_ssa_op *ssa_op, int call_level, zend_jit_trace_rec *trace, zend_bool stack_check) +static int zend_jit_init_fcall(dasm_State **Dst, const zend_op *opline, uint32_t b, const zend_op_array *op_array, zend_ssa *ssa, const zend_ssa_op *ssa_op, int call_level, zend_jit_trace_rec *trace, bool stack_check) { zend_func_info *info = ZEND_FUNC_INFO(op_array); zend_call_info *call_info = NULL; @@ -9315,12 +9315,12 @@ static int zend_jit_init_method_call(dasm_State **Dst, uint32_t op1_info, zend_jit_addr op1_addr, zend_class_entry *ce, - zend_bool ce_is_instanceof, - zend_bool use_this, + bool ce_is_instanceof, + bool use_this, zend_class_entry *trace_ce, zend_jit_trace_rec *trace, - zend_bool stack_check, - zend_bool polymorphic_side_trace) + bool stack_check, + bool polymorphic_side_trace) { zend_func_info *info = ZEND_FUNC_INFO(op_array); zend_call_info *call_info = NULL; @@ -9564,7 +9564,7 @@ static int zend_jit_init_closure_call(dasm_State **Dst, const zend_ssa_op *ssa_op, int call_level, zend_jit_trace_rec *trace, - zend_bool stack_check) + bool stack_check) { zend_function *func = NULL; zend_jit_addr op2_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->op2.var); @@ -9690,7 +9690,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend uint32_t i; zend_jit_addr res_addr; uint32_t call_num_args = 0; - zend_bool unknown_num_args = 0; + bool unknown_num_args = 0; const void *exit_addr = NULL; const zend_op *prev_opline; @@ -10220,7 +10220,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend if (!RETURN_VALUE_USED(opline)) { zend_class_entry *ce; - zend_bool ce_is_instanceof; + bool ce_is_instanceof; uint32_t func_info = call_info ? zend_get_func_info(call_info, ssa, &ce, &ce_is_instanceof) : (MAY_BE_ANY|MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN); @@ -11166,17 +11166,17 @@ static int zend_jit_leave_func(dasm_State **Dst, const zend_op_array *op_array, const zend_op *opline, uint32_t op1_info, - zend_bool left_frame, + bool left_frame, zend_jit_trace_rec *trace, zend_jit_trace_info *trace_info, int indirect_var_access, int may_throw) { - zend_bool may_be_top_frame = + bool may_be_top_frame = JIT_G(trigger) != ZEND_JIT_ON_HOT_TRACE || !JIT_G(current_frame) || !TRACE_FRAME_IS_NESTED(JIT_G(current_frame)); - zend_bool may_need_call_helper = + bool may_need_call_helper = indirect_var_access || /* may have symbol table */ !op_array->function_name || /* may have symbol table */ may_be_top_frame || @@ -11185,7 +11185,7 @@ static int zend_jit_leave_func(dasm_State **Dst, !JIT_G(current_frame) || TRACE_FRAME_NUM_ARGS(JIT_G(current_frame)) == -1 || /* unknown number of args */ (uint32_t)TRACE_FRAME_NUM_ARGS(JIT_G(current_frame)) > op_array->num_args; /* extra args */ - zend_bool may_need_release_this = + bool may_need_release_this = !(op_array->fn_flags & ZEND_ACC_CLOSURE) && op_array->scope && !(op_array->fn_flags & ZEND_ACC_STATIC) && @@ -11596,7 +11596,7 @@ static int zend_jit_zval_copy_deref(dasm_State **Dst, zend_jit_addr res_addr, ze return 1; } -static zend_bool zend_jit_may_avoid_refcounting(const zend_op *opline) +static bool zend_jit_may_avoid_refcounting(const zend_op *opline) { switch (opline->opcode) { case ZEND_FETCH_OBJ_FUNC_ARG: @@ -11639,7 +11639,7 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst, const zend_ssa_op *ssa_op, uint32_t op1_info, zend_jit_addr op1_addr, - zend_bool op1_avoid_refcounting, + bool op1_avoid_refcounting, uint32_t op2_info, uint32_t res_info, zend_jit_addr res_addr, @@ -11649,7 +11649,7 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst, const void *exit_addr = NULL; const void *not_found_exit_addr = NULL; const void *res_exit_addr = NULL; - zend_bool result_avoid_refcounting = 0; + bool result_avoid_refcounting = 0; uint32_t may_be_string = (opline->opcode != ZEND_FETCH_LIST_R) ? MAY_BE_STRING : 0; orig_op1_addr = OP1_ADDR(); @@ -12150,7 +12150,7 @@ static int zend_jit_isset_isempty_dim(dasm_State **Dst, const zend_op *opline, uint32_t op1_info, zend_jit_addr op1_addr, - zend_bool op1_avoid_refcounting, + bool op1_avoid_refcounting, uint32_t op2_info, int may_throw, zend_uchar smart_branch_opcode, @@ -12408,10 +12408,10 @@ static int zend_jit_bind_global(dasm_State **Dst, const zend_op *opline, uint32_ return 1; } -static int zend_jit_verify_arg_type(dasm_State **Dst, const zend_op *opline, zend_arg_info *arg_info, zend_bool check_exception) +static int zend_jit_verify_arg_type(dasm_State **Dst, const zend_op *opline, zend_arg_info *arg_info, bool check_exception) { zend_jit_addr res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var); - zend_bool in_cold = 0; + bool in_cold = 0; uint32_t type_mask = ZEND_TYPE_PURE_MASK(arg_info->type) & MAY_BE_ANY; zend_reg tmp_reg = (type_mask == 0 || is_power_of_two(type_mask)) ? ZREG_FCARG1a : ZREG_R0; @@ -12532,7 +12532,7 @@ static int zend_jit_recv(dasm_State **Dst, const zend_op *opline, const zend_op_ return 1; } -static int zend_jit_recv_init(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, zend_bool is_last, int may_throw) +static int zend_jit_recv_init(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, bool is_last, int may_throw) { uint32_t arg_num = opline->op1.num; zval *zv = RT_CONSTANT(opline, opline->op2); @@ -12608,7 +12608,7 @@ static int zend_jit_recv_init(dasm_State **Dst, const zend_op *opline, const zen return 1; } -static zend_property_info* zend_get_known_property_info(zend_class_entry *ce, zend_string *member, zend_bool on_this, zend_string *filename) +static zend_property_info* zend_get_known_property_info(zend_class_entry *ce, zend_string *member, bool on_this, zend_string *filename) { zend_property_info *info = NULL; @@ -12657,7 +12657,7 @@ static zend_property_info* zend_get_known_property_info(zend_class_entry *ce, ze return info; } -static zend_bool zend_may_be_dynamic_property(zend_class_entry *ce, zend_string *member, zend_bool on_this, zend_string *filename) +static bool zend_may_be_dynamic_property(zend_class_entry *ce, zend_string *member, bool on_this, zend_string *filename) { zend_property_info *info; @@ -12718,17 +12718,17 @@ static int zend_jit_fetch_obj(dasm_State **Dst, const zend_ssa_op *ssa_op, uint32_t op1_info, zend_jit_addr op1_addr, - zend_bool op1_indirect, + bool op1_indirect, zend_class_entry *ce, - zend_bool ce_is_instanceof, - zend_bool use_this, - zend_bool op1_avoid_refcounting, + bool ce_is_instanceof, + bool use_this, + bool op1_avoid_refcounting, zend_class_entry *trace_ce, int may_throw) { zval *member; zend_property_info *prop_info; - zend_bool may_be_dynamic = 1; + bool may_be_dynamic = 1; zend_jit_addr res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var); zend_jit_addr this_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, offsetof(zend_execute_data, This)); zend_jit_addr prop_addr; @@ -12929,7 +12929,7 @@ static int zend_jit_fetch_obj(dasm_State **Dst, ssa->var_info[ssa_op->result_def].indirect_reference = 1; } } else { - zend_bool result_avoid_refcounting = 0; + bool result_avoid_refcounting = 0; if ((res_info & MAY_BE_GUARD) && JIT_G(current_frame) && prop_info) { uint32_t flags = 0; @@ -13109,10 +13109,10 @@ static int zend_jit_incdec_obj(dasm_State **Dst, const zend_ssa_op *ssa_op, uint32_t op1_info, zend_jit_addr op1_addr, - zend_bool op1_indirect, + bool op1_indirect, zend_class_entry *ce, - zend_bool ce_is_instanceof, - zend_bool use_this, + bool ce_is_instanceof, + bool use_this, zend_class_entry *trace_ce, int may_throw) { @@ -13122,7 +13122,7 @@ static int zend_jit_incdec_obj(dasm_State **Dst, zend_jit_addr this_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, offsetof(zend_execute_data, This)); zend_jit_addr res_addr = 0; zend_jit_addr prop_addr; - zend_bool needs_slow_path = 0; + bool needs_slow_path = 0; ZEND_ASSERT(opline->op2_type == IS_CONST); ZEND_ASSERT(op1_info & MAY_BE_OBJECT); @@ -13485,10 +13485,10 @@ static int zend_jit_assign_obj_op(dasm_State **Dst, zend_jit_addr op1_addr, uint32_t val_info, zend_ssa_range *val_range, - zend_bool op1_indirect, + bool op1_indirect, zend_class_entry *ce, - zend_bool ce_is_instanceof, - zend_bool use_this, + bool ce_is_instanceof, + bool use_this, zend_class_entry *trace_ce, int may_throw) { @@ -13498,7 +13498,7 @@ static int zend_jit_assign_obj_op(dasm_State **Dst, zend_jit_addr val_addr = OP1_DATA_ADDR(); zend_jit_addr this_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, offsetof(zend_execute_data, This)); zend_jit_addr prop_addr; - zend_bool needs_slow_path = 0; + bool needs_slow_path = 0; binary_op_type binary_op = get_binary_op(opline->extended_value); ZEND_ASSERT(opline->op2_type == IS_CONST); @@ -13815,10 +13815,10 @@ static int zend_jit_assign_obj(dasm_State **Dst, uint32_t op1_info, zend_jit_addr op1_addr, uint32_t val_info, - zend_bool op1_indirect, + bool op1_indirect, zend_class_entry *ce, - zend_bool ce_is_instanceof, - zend_bool use_this, + bool ce_is_instanceof, + bool use_this, zend_class_entry *trace_ce, int may_throw) { @@ -13829,7 +13829,7 @@ static int zend_jit_assign_obj(dasm_State **Dst, zend_jit_addr res_addr = 0; zend_jit_addr this_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, offsetof(zend_execute_data, This)); zend_jit_addr prop_addr; - zend_bool needs_slow_path = 0; + bool needs_slow_path = 0; if (RETURN_VALUE_USED(opline)) { res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var); @@ -14246,7 +14246,7 @@ static int zend_jit_load_this(dasm_State **Dst, uint32_t var) return 1; } -static int zend_jit_fetch_this(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, zend_bool check_only) +static int zend_jit_fetch_this(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, bool check_only) { if (!op_array->scope || (op_array->fn_flags & ZEND_ACC_STATIC)) { if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE) { @@ -14654,13 +14654,13 @@ static int zend_jit_switch(dasm_State **Dst, const zend_op *opline, const zend_o return 1; } -static zend_bool zend_jit_verify_return_type(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, uint32_t op1_info) +static bool zend_jit_verify_return_type(dasm_State **Dst, const zend_op *opline, const zend_op_array *op_array, uint32_t op1_info) { zend_arg_info *arg_info = &op_array->arg_info[-1]; ZEND_ASSERT(ZEND_TYPE_IS_SET(arg_info->type)); zend_jit_addr op1_addr = OP1_ADDR(); - zend_bool needs_slow_check = 1; - zend_bool slow_check_in_cold = 1; + bool needs_slow_check = 1; + bool slow_check_in_cold = 1; uint32_t type_mask = ZEND_TYPE_PURE_MASK(arg_info->type) & MAY_BE_ANY; if (type_mask == 0) { @@ -15055,7 +15055,7 @@ static int zend_jit_in_array(dasm_State **Dst, const zend_op *opline, uint32_t o return 1; } -static zend_bool zend_jit_noref_guard(dasm_State **Dst, const zend_op *opline, zend_jit_addr var_addr) +static bool zend_jit_noref_guard(dasm_State **Dst, const zend_op *opline, zend_jit_addr var_addr) { int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0); const void *exit_addr = zend_jit_trace_get_exit_addr(exit_point); @@ -15068,7 +15068,7 @@ static zend_bool zend_jit_noref_guard(dasm_State **Dst, const zend_op *opline, z return 1; } -static zend_bool zend_jit_fetch_reference(dasm_State **Dst, const zend_op *opline, uint8_t var_type, uint32_t *var_info_ptr, zend_jit_addr *var_addr_ptr, zend_bool add_ref_guard, zend_bool add_type_guard) +static bool zend_jit_fetch_reference(dasm_State **Dst, const zend_op *opline, uint8_t var_type, uint32_t *var_info_ptr, zend_jit_addr *var_addr_ptr, bool add_ref_guard, bool add_type_guard) { zend_jit_addr var_addr = *var_addr_ptr; uint32_t var_info = *var_info_ptr; @@ -15124,7 +15124,7 @@ static zend_bool zend_jit_fetch_reference(dasm_State **Dst, const zend_op *oplin return 1; } -static zend_bool zend_jit_fetch_indirect_var(dasm_State **Dst, const zend_op *opline, uint8_t var_type, uint32_t *var_info_ptr, zend_jit_addr *var_addr_ptr, zend_bool add_indirect_guard) +static bool zend_jit_fetch_indirect_var(dasm_State **Dst, const zend_op *opline, uint8_t var_type, uint32_t *var_info_ptr, zend_jit_addr *var_addr_ptr, bool add_indirect_guard) { zend_jit_addr var_addr = *var_addr_ptr; uint32_t var_info = *var_info_ptr; @@ -15187,7 +15187,7 @@ static zend_bool zend_jit_fetch_indirect_var(dasm_State **Dst, const zend_op *op return 1; } -static zend_bool zend_jit_may_reuse_reg(const zend_op *opline, const zend_ssa_op *ssa_op, zend_ssa *ssa, int def_var, int use_var) +static bool zend_jit_may_reuse_reg(const zend_op *opline, const zend_ssa_op *ssa_op, zend_ssa *ssa, int def_var, int use_var) { if ((ssa->var_info[def_var].type & ~MAY_BE_GUARD) != (ssa->var_info[use_var].type & ~MAY_BE_GUARD)) { return 0; @@ -15219,7 +15219,7 @@ static zend_bool zend_jit_may_reuse_reg(const zend_op *opline, const zend_ssa_op return 0; } -static zend_bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op, zend_jit_trace_rec *trace) +static bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op, zend_jit_trace_rec *trace) { uint32_t op1_info, op2_info; @@ -15290,7 +15290,7 @@ static zend_bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zen return 0; } -static zend_bool zend_jit_var_supports_reg(zend_ssa *ssa, int var) +static bool zend_jit_var_supports_reg(zend_ssa *ssa, int var) { if (ssa->vars[var].no_val) { /* we don't need the value */ @@ -15324,7 +15324,7 @@ static zend_bool zend_jit_var_supports_reg(zend_ssa *ssa, int var) return 1; } -static zend_bool zend_jit_may_be_in_reg(const zend_op_array *op_array, zend_ssa *ssa, int var) +static bool zend_jit_may_be_in_reg(const zend_op_array *op_array, zend_ssa *ssa, int var) { if (!zend_jit_var_supports_reg(ssa, var)) { return 0; @@ -15352,7 +15352,7 @@ static zend_bool zend_jit_may_be_in_reg(const zend_op_array *op_array, zend_ssa return 1; } -static zend_bool zend_needs_extra_reg_for_const(const zend_op *opline, zend_uchar op_type, znode_op op) +static bool zend_needs_extra_reg_for_const(const zend_op *opline, zend_uchar op_type, znode_op op) { |.if X64 || if (op_type == IS_CONST) { @@ -15367,7 +15367,7 @@ static zend_bool zend_needs_extra_reg_for_const(const zend_op *opline, zend_ucha return 0; } -static zend_regset zend_jit_get_def_scratch_regset(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, int current_var, zend_bool last_use) +static zend_regset zend_jit_get_def_scratch_regset(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, int current_var, bool last_use) { uint32_t op1_info, op2_info; @@ -15389,7 +15389,7 @@ static zend_regset zend_jit_get_def_scratch_regset(const zend_op *opline, const return ZEND_REGSET_EMPTY; } -static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, int current_var, zend_bool last_use) +static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, int current_var, bool last_use) { uint32_t op1_info, op2_info, res_info; zend_regset regset = ZEND_REGSET_SCRATCH; diff --git a/ext/opcache/jit/zend_jit_x86.h b/ext/opcache/jit/zend_jit_x86.h index 10a82db14f..e9476ebb31 100644 --- a/ext/opcache/jit/zend_jit_x86.h +++ b/ext/opcache/jit/zend_jit_x86.h @@ -318,7 +318,7 @@ static zend_always_inline zend_jit_addr _zend_jit_decode_op(zend_uchar op_type, #define OP1_DATA_DEF_REG_ADDR() \ OP_REG_ADDR(opline + 1, op1_type, op1, op1_def) -static zend_always_inline zend_bool zend_jit_same_addr(zend_jit_addr addr1, zend_jit_addr addr2) +static zend_always_inline bool zend_jit_same_addr(zend_jit_addr addr1, zend_jit_addr addr2) { if (addr1 == addr2) { return 1; diff --git a/ext/opcache/zend_accelerator_blacklist.c b/ext/opcache/zend_accelerator_blacklist.c index 45ad0b2685..0c89839439 100644 --- a/ext/opcache/zend_accelerator_blacklist.c +++ b/ext/opcache/zend_accelerator_blacklist.c @@ -344,7 +344,7 @@ void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename) zend_accel_blacklist_update_regexp(blacklist); } -zend_bool zend_accel_blacklist_is_blacklisted(zend_blacklist *blacklist, char *verify_path, size_t verify_path_len) +bool zend_accel_blacklist_is_blacklisted(zend_blacklist *blacklist, char *verify_path, size_t verify_path_len) { int ret = 0; zend_regexp_list *regexp_list_it = blacklist->regexp_list; diff --git a/ext/opcache/zend_accelerator_blacklist.h b/ext/opcache/zend_accelerator_blacklist.h index 16c75bb396..a75a0e1ed8 100644 --- a/ext/opcache/zend_accelerator_blacklist.h +++ b/ext/opcache/zend_accelerator_blacklist.h @@ -45,7 +45,7 @@ void zend_accel_blacklist_init(zend_blacklist *blacklist); void zend_accel_blacklist_shutdown(zend_blacklist *blacklist); void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename); -zend_bool zend_accel_blacklist_is_blacklisted(zend_blacklist *blacklist, char *verify_path, size_t verify_path_len); +bool zend_accel_blacklist_is_blacklisted(zend_blacklist *blacklist, char *verify_path, size_t verify_path_len); void zend_accel_blacklist_apply(zend_blacklist *blacklist, blacklist_apply_func_arg_t func, void *argument); #endif /* ZEND_ACCELERATOR_BLACKLIST_H */ diff --git a/ext/opcache/zend_accelerator_hash.c b/ext/opcache/zend_accelerator_hash.c index b0293ae8f2..b3f2dfce20 100644 --- a/ext/opcache/zend_accelerator_hash.c +++ b/ext/opcache/zend_accelerator_hash.c @@ -71,7 +71,7 @@ void zend_accel_hash_init(zend_accel_hash *accel_hash, uint32_t hash_size) * Returns pointer the actual hash entry on success * key needs to be already allocated as it is not copied */ -zend_accel_hash_entry* zend_accel_hash_update(zend_accel_hash *accel_hash, const char *key, uint32_t key_length, zend_bool indirect, void *data) +zend_accel_hash_entry* zend_accel_hash_update(zend_accel_hash *accel_hash, const char *key, uint32_t key_length, bool indirect, void *data) { zend_ulong hash_value; zend_ulong index; diff --git a/ext/opcache/zend_accelerator_hash.h b/ext/opcache/zend_accelerator_hash.h index dc18ca54e1..88edbd23d8 100644 --- a/ext/opcache/zend_accelerator_hash.h +++ b/ext/opcache/zend_accelerator_hash.h @@ -50,7 +50,7 @@ struct _zend_accel_hash_entry { zend_accel_hash_entry *next; void *data; uint32_t key_length; - zend_bool indirect; + bool indirect; }; typedef struct _zend_accel_hash { @@ -68,7 +68,7 @@ zend_accel_hash_entry* zend_accel_hash_update( zend_accel_hash *accel_hash, const char *key, uint32_t key_length, - zend_bool indirect, + bool indirect, void *data); void* zend_accel_hash_find( @@ -94,7 +94,7 @@ int zend_accel_hash_unlink( const char *key, uint32_t key_length); -static inline zend_bool zend_accel_hash_is_full(zend_accel_hash *accel_hash) +static inline bool zend_accel_hash_is_full(zend_accel_hash *accel_hash) { if (accel_hash->num_entries == accel_hash->max_num_entries) { return 1; diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index d68ab9531a..1abbb5bb64 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -116,7 +116,7 @@ static ZEND_INI_MH(OnEnable) return OnUpdateBool(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); } else { /* It may be only temporary disabled */ - zend_bool *p = (zend_bool *) ZEND_INI_GET_ADDR(); + bool *p = (bool *) ZEND_INI_GET_ADDR(); if ((ZSTR_LEN(new_value) == 2 && strcasecmp("on", ZSTR_VAL(new_value)) == 0) || (ZSTR_LEN(new_value) == 3 && strcasecmp("yes", ZSTR_VAL(new_value)) == 0) || (ZSTR_LEN(new_value) == 4 && strcasecmp("true", ZSTR_VAL(new_value)) == 0) || @@ -572,7 +572,7 @@ ZEND_FUNCTION(opcache_get_status) { zend_long reqs; zval memory_usage, statistics, scripts; - zend_bool fetch_scripts = 1; + bool fetch_scripts = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &fetch_scripts) == FAILURE) { RETURN_THROWS(); @@ -839,7 +839,7 @@ ZEND_FUNCTION(opcache_invalidate) { char *script_name; size_t script_name_len; - zend_bool force = 0; + bool force = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|b", &script_name, &script_name_len, &force) == FAILURE) { RETURN_THROWS(); diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index c37bb2ec45..2f7194a7ca 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -285,7 +285,7 @@ static HashTable *zend_persist_attributes(HashTable *attributes) return ptr; } -static void zend_persist_type(zend_type *type, zend_bool use_arena) { +static void zend_persist_type(zend_type *type, bool use_arena) { if (ZEND_TYPE_HAS_LIST(*type)) { zend_type_list *list = ZEND_TYPE_LIST(*type); if (ZEND_TYPE_USES_ARENA(*type)) { diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c index 191674b641..7731b9a970 100644 --- a/ext/opcache/zend_persist_calc.c +++ b/ext/opcache/zend_persist_calc.c @@ -166,7 +166,7 @@ static void zend_persist_attributes_calc(HashTable *attributes) } } -static void zend_persist_type_calc(zend_type *type, zend_bool use_arena) +static void zend_persist_type_calc(zend_type *type, bool use_arena) { if (ZEND_TYPE_HAS_LIST(*type)) { if (ZEND_TYPE_USES_ARENA(*type) && !ZCG(is_immutable_class) && use_arena) { diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c index f4cb4f55af..698c2884ca 100644 --- a/ext/opcache/zend_shared_alloc.c +++ b/ext/opcache/zend_shared_alloc.c @@ -375,7 +375,7 @@ int zend_shared_memdup_size(void *source, size_t size) return ZEND_ALIGNED_SIZE(size); } -static zend_always_inline void *_zend_shared_memdup(void *source, size_t size, zend_bool arena, zend_bool get_xlat, zend_bool set_xlat, zend_bool free_source) +static zend_always_inline void *_zend_shared_memdup(void *source, size_t size, bool arena, bool get_xlat, bool set_xlat, bool free_source) { void *old_p, *retval; zend_ulong key; diff --git a/ext/opcache/zend_shared_alloc.h b/ext/opcache/zend_shared_alloc.h index 1dbc88d42e..8d37376570 100644 --- a/ext/opcache/zend_shared_alloc.h +++ b/ext/opcache/zend_shared_alloc.h @@ -109,7 +109,7 @@ typedef struct _zend_smm_shared_globals { /* Amount of shared memory allocated by garbage */ size_t wasted_shared_memory; /* No more shared memory flag */ - zend_bool memory_exhausted; + bool memory_exhausted; /* Saved Shared Allocator State */ zend_shared_memory_state shared_memory_state; /* Pointer to the application's shared data structures */ diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index effc659b68..06195004f1 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -1471,7 +1471,7 @@ PHP_FUNCTION(openssl_x509_export_to_file) zend_object *cert_obj; zend_string *cert_str; - zend_bool notext = 1; + bool notext = 1; BIO * bio_out; char * filename; size_t filename_len; @@ -1781,7 +1781,7 @@ PHP_FUNCTION(openssl_x509_export) zend_object *cert_obj; zend_string *cert_str; zval *zout; - zend_bool notext = 1; + bool notext = 1; BIO * bio_out; ZEND_PARSE_PARAMETERS_START(2, 3) @@ -1827,7 +1827,7 @@ cleanup: } /* }}} */ -zend_string* php_openssl_x509_fingerprint(X509 *peer, const char *method, zend_bool raw) +zend_string* php_openssl_x509_fingerprint(X509 *peer, const char *method, bool raw) { unsigned char md[EVP_MAX_MD_SIZE]; const EVP_MD *mdtype; @@ -1859,7 +1859,7 @@ PHP_FUNCTION(openssl_x509_fingerprint) X509 *cert; zend_object *cert_obj; zend_string *cert_str; - zend_bool raw_output = 0; + bool raw_output = 0; char *method = "sha1"; size_t method_len; zend_string *fingerprint; @@ -2038,7 +2038,7 @@ PHP_FUNCTION(openssl_x509_parse) zend_object *cert_obj; zend_string *cert_str; int i, sig_nid; - zend_bool useshortnames = 1; + bool useshortnames = 1; char * tmpstr; zval subitem; X509_EXTENSION *extension; @@ -3034,7 +3034,7 @@ PHP_FUNCTION(openssl_csr_export_to_file) X509_REQ *csr; zend_object *csr_obj; zend_string *csr_str; - zend_bool notext = 1; + bool notext = 1; char * filename = NULL; size_t filename_len; BIO * bio_out; @@ -3088,7 +3088,7 @@ PHP_FUNCTION(openssl_csr_export) zend_object *csr_obj; zend_string *csr_str; zval *zout; - zend_bool notext = 1; + bool notext = 1; BIO * bio_out; ZEND_PARSE_PARAMETERS_START(2, 3) @@ -3375,7 +3375,7 @@ PHP_FUNCTION(openssl_csr_get_subject) X509_REQ *csr; zend_object *csr_obj; zend_string *csr_str; - zend_bool use_shortnames = 1; + bool use_shortnames = 1; X509_NAME *subject; ZEND_PARSE_PARAMETERS_START(1, 2) @@ -3406,7 +3406,7 @@ PHP_FUNCTION(openssl_csr_get_public_key) X509_REQ *orig_csr, *csr; zend_object *csr_obj; zend_string *csr_str; - zend_bool use_shortnames = 1; + bool use_shortnames = 1; php_openssl_pkey_object *key_object; EVP_PKEY *tpubkey; @@ -3874,7 +3874,7 @@ static int php_openssl_is_private_key(EVP_PKEY* pkey) } while (0); /* {{{ php_openssl_pkey_init_rsa */ -static zend_bool php_openssl_pkey_init_and_assign_rsa(EVP_PKEY *pkey, RSA *rsa, zval *data) +static bool php_openssl_pkey_init_and_assign_rsa(EVP_PKEY *pkey, RSA *rsa, zval *data) { BIGNUM *n, *e, *d, *p, *q, *dmp1, *dmq1, *iqmp; @@ -3907,7 +3907,7 @@ static zend_bool php_openssl_pkey_init_and_assign_rsa(EVP_PKEY *pkey, RSA *rsa, } /* {{{ php_openssl_pkey_init_dsa */ -static zend_bool php_openssl_pkey_init_dsa(DSA *dsa, zval *data) +static bool php_openssl_pkey_init_dsa(DSA *dsa, zval *data) { BIGNUM *p, *q, *g, *priv_key, *pub_key; const BIGNUM *priv_key_const, *pub_key_const; @@ -3985,7 +3985,7 @@ static BIGNUM *php_openssl_dh_pub_from_priv(BIGNUM *priv_key, BIGNUM *g, BIGNUM /* }}} */ /* {{{ php_openssl_pkey_init_dh */ -static zend_bool php_openssl_pkey_init_dh(DH *dh, zval *data) +static bool php_openssl_pkey_init_dh(DH *dh, zval *data) { BIGNUM *p, *q, *g, *priv_key, *pub_key; @@ -6763,7 +6763,7 @@ static void php_openssl_add_method(const OBJ_NAME *name, void *arg) /* {{{ */ /* {{{ Return array of available digest algorithms */ PHP_FUNCTION(openssl_get_md_methods) { - zend_bool aliases = 0; + bool aliases = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &aliases) == FAILURE) { RETURN_THROWS(); @@ -6778,7 +6778,7 @@ PHP_FUNCTION(openssl_get_md_methods) /* {{{ Return array of available cipher algorithms */ PHP_FUNCTION(openssl_get_cipher_methods) { - zend_bool aliases = 0; + bool aliases = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &aliases) == FAILURE) { RETURN_THROWS(); @@ -6823,7 +6823,7 @@ PHP_FUNCTION(openssl_get_curve_names) /* {{{ Computes digest hash value for given data using given method, returns raw or binhex encoded string */ PHP_FUNCTION(openssl_digest) { - zend_bool raw_output = 0; + bool raw_output = 0; char *data, *method; size_t data_len, method_len; const EVP_MD *mdtype; @@ -6872,10 +6872,10 @@ PHP_FUNCTION(openssl_digest) /* Cipher mode info */ struct php_openssl_cipher_mode { - zend_bool is_aead; - zend_bool is_single_run_aead; - zend_bool set_tag_length_always; - zend_bool set_tag_length_when_encrypting; + bool is_aead; + bool is_single_run_aead; + bool set_tag_length_always; + bool set_tag_length_when_encrypting; int aead_get_tag_flag; int aead_set_tag_flag; int aead_ivlen_flag; @@ -6927,7 +6927,7 @@ static void php_openssl_load_cipher_mode(struct php_openssl_cipher_mode *mode, c /* }}} */ static int php_openssl_validate_iv(const char **piv, size_t *piv_len, size_t iv_required_len, - zend_bool *free_iv, EVP_CIPHER_CTX *cipher_ctx, struct php_openssl_cipher_mode *mode) /* {{{ */ + bool *free_iv, EVP_CIPHER_CTX *cipher_ctx, struct php_openssl_cipher_mode *mode) /* {{{ */ { char *iv_new; @@ -6980,8 +6980,8 @@ static int php_openssl_validate_iv(const char **piv, size_t *piv_len, size_t iv_ static int php_openssl_cipher_init(const EVP_CIPHER *cipher_type, EVP_CIPHER_CTX *cipher_ctx, struct php_openssl_cipher_mode *mode, - const char **ppassword, size_t *ppassword_len, zend_bool *free_password, - const char **piv, size_t *piv_len, zend_bool *free_iv, + const char **ppassword, size_t *ppassword_len, bool *free_password, + const char **piv, size_t *piv_len, bool *free_iv, const char *tag, int tag_len, zend_long options, int enc) /* {{{ */ { unsigned char *key; @@ -7106,7 +7106,7 @@ PHP_OPENSSL_API zend_string* php_openssl_encrypt( EVP_CIPHER_CTX *cipher_ctx; struct php_openssl_cipher_mode mode; int i = 0, outlen; - zend_bool free_iv = 0, free_password = 0; + bool free_iv = 0, free_password = 0; zend_string *outbuf = NULL; PHP_OPENSSL_CHECK_SIZE_T_TO_INT_NULL_RETURN(data_len, data); @@ -7220,7 +7220,7 @@ PHP_OPENSSL_API zend_string* php_openssl_decrypt( struct php_openssl_cipher_mode mode; int i = 0, outlen; zend_string *base64_str = NULL; - zend_bool free_iv = 0, free_password = 0; + bool free_iv = 0, free_password = 0; zend_string *outbuf = NULL; PHP_OPENSSL_CHECK_SIZE_T_TO_INT_NULL_RETURN(data_len, data); diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 6fdbf1df16..d06db22be5 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -115,7 +115,7 @@ static RSA *php_openssl_tmp_rsa_cb(SSL *s, int is_export, int keylength); #endif extern php_stream* php_openssl_get_stream_from_ssl_handle(const SSL *ssl); -extern zend_string* php_openssl_x509_fingerprint(X509 *peer, const char *method, zend_bool raw); +extern zend_string* php_openssl_x509_fingerprint(X509 *peer, const char *method, bool raw); extern int php_openssl_get_ssl_stream_data_index(); static struct timeval php_openssl_subtract_timeval(struct timeval a, struct timeval b); static int php_openssl_compare_timeval(struct timeval a, struct timeval b); @@ -196,7 +196,7 @@ static int php_openssl_is_http_stream_talking_to_iis(php_stream *stream) /* {{{ } /* }}} */ -static int php_openssl_handle_ssl_error(php_stream *stream, int nr_bytes, zend_bool is_init) /* {{{ */ +static int php_openssl_handle_ssl_error(php_stream *stream, int nr_bytes, bool is_init) /* {{{ */ { php_openssl_netstream_data_t *sslsock = (php_openssl_netstream_data_t*)stream->abstract; int err = SSL_get_error(sslsock->ssl_handle, nr_bytes); @@ -334,7 +334,7 @@ static int php_openssl_x509_fingerprint_cmp(X509 *peer, const char *method, cons return result; } -static zend_bool php_openssl_x509_fingerprint_match(X509 *peer, zval *val) +static bool php_openssl_x509_fingerprint_match(X509 *peer, zval *val) { if (Z_TYPE_P(val) == IS_STRING) { const char *method = NULL; @@ -378,7 +378,7 @@ static zend_bool php_openssl_x509_fingerprint_match(X509 *peer, zval *val) return 0; } -static zend_bool php_openssl_matches_wildcard_name(const char *subjectname, const char *certname) /* {{{ */ +static bool php_openssl_matches_wildcard_name(const char *subjectname, const char *certname) /* {{{ */ { char *wildcard = NULL; ptrdiff_t prefix_len; @@ -413,7 +413,7 @@ static zend_bool php_openssl_matches_wildcard_name(const char *subjectname, cons } /* }}} */ -static zend_bool php_openssl_matches_san_list(X509 *peer, const char *subject_name) /* {{{ */ +static bool php_openssl_matches_san_list(X509 *peer, const char *subject_name) /* {{{ */ { int i, len; unsigned char *cert_name = NULL; @@ -473,11 +473,11 @@ static zend_bool php_openssl_matches_san_list(X509 *peer, const char *subject_na } /* }}} */ -static zend_bool php_openssl_matches_common_name(X509 *peer, const char *subject_name) /* {{{ */ +static bool php_openssl_matches_common_name(X509 *peer, const char *subject_name) /* {{{ */ { char buf[1024]; X509_NAME *cert_name; - zend_bool is_match = 0; + bool is_match = 0; int cert_name_len; cert_name = X509_get_subject_name(peer); @@ -627,7 +627,7 @@ static int php_openssl_win_cert_verify_callback(X509_STORE_CTX *x509_store_ctx, php_stream *stream; php_openssl_netstream_data_t *sslsock; zval *val; - zend_bool is_self_signed = 0; + bool is_self_signed = 0; stream = (php_stream*)arg; @@ -2292,7 +2292,7 @@ static inline int php_openssl_tcp_sockop_accept(php_stream *stream, php_openssl_ php_stream_xport_param *xparam STREAMS_DC) /* {{{ */ { int clisock; - zend_bool nodelay = 0; + bool nodelay = 0; zval *tmpzval = NULL; xparam->outputs.client = NULL; diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index f9a48b0406..def0ac637d 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -885,8 +885,8 @@ PHP_FUNCTION(pcntl_signal) { zval *handle; zend_long signo; - zend_bool restart_syscalls = 1; - zend_bool restart_syscalls_is_null = 1; + bool restart_syscalls = 1; + bool restart_syscalls_is_null = 1; char *error = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS(), "lz|b!", &signo, &handle, &restart_syscalls, &restart_syscalls_is_null) == FAILURE) { @@ -1185,7 +1185,7 @@ PHP_FUNCTION(pcntl_getpriority) { zend_long who = PRIO_PROCESS; zend_long pid; - zend_bool pid_is_null = 1; + bool pid_is_null = 1; int pri; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!l", &pid, &pid_is_null, &who) == FAILURE) { @@ -1224,7 +1224,7 @@ PHP_FUNCTION(pcntl_setpriority) { zend_long who = PRIO_PROCESS; zend_long pid; - zend_bool pid_is_null = 1; + bool pid_is_null = 1; zend_long pri; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l!l", &pri, &pid, &pid_is_null, &who) == FAILURE) { @@ -1387,7 +1387,7 @@ void pcntl_signal_dispatch() /* {{{ Enable/disable asynchronous signal handling and return the old setting. */ PHP_FUNCTION(pcntl_async_signals) { - zend_bool on, on_is_null = 1; + bool on, on_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b!", &on, &on_is_null) == FAILURE) { RETURN_THROWS(); diff --git a/ext/pcntl/php_pcntl.h b/ext/pcntl/php_pcntl.h index 4fec1627ad..05bd8d4c13 100644 --- a/ext/pcntl/php_pcntl.h +++ b/ext/pcntl/php_pcntl.h @@ -86,7 +86,7 @@ ZEND_BEGIN_MODULE_GLOBALS(pcntl) struct php_pcntl_pending_signal *head, *tail, *spares; int last_error; volatile char pending_signals; - zend_bool async_signals; + bool async_signals; ZEND_END_MODULE_GLOBALS(pcntl) #if defined(ZTS) && defined(COMPILE_DL_PCNTL) diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index fae3eb0e76..e9d8f6869d 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -67,7 +67,7 @@ ZEND_TLS pcre2_general_context *gctx = NULL; ZEND_TLS pcre2_compile_context *cctx = NULL; ZEND_TLS pcre2_match_context *mctx = NULL; ZEND_TLS pcre2_match_data *mdata = NULL; -ZEND_TLS zend_bool mdata_used = 0; +ZEND_TLS bool mdata_used = 0; ZEND_TLS uint8_t pcre2_init_ok = 0; #if defined(ZTS) && defined(HAVE_PCRE_JIT_SUPPORT) static MUTEX_T pcre_mt = NULL; @@ -999,7 +999,7 @@ static inline void populate_match_value( } static inline void add_named( - zval *subpats, zend_string *name, zval *val, zend_bool unmatched) { + zval *subpats, zend_string *name, zval *val, bool unmatched) { /* If the DUPNAMES option is used, multiple subpatterns might have the same name. * In this case we want to preserve the one that actually has a value. */ if (!unmatched) { @@ -1049,8 +1049,8 @@ static inline void add_offset_pair( static void populate_subpat_array( zval *subpats, const char *subject, PCRE2_SIZE *offsets, zend_string **subpat_names, uint32_t num_subpats, int count, const PCRE2_SPTR mark, zend_long flags) { - zend_bool offset_capture = (flags & PREG_OFFSET_CAPTURE) != 0; - zend_bool unmatched_as_null = (flags & PREG_UNMATCHED_AS_NULL) != 0; + bool offset_capture = (flags & PREG_OFFSET_CAPTURE) != 0; + bool unmatched_as_null = (flags & PREG_UNMATCHED_AS_NULL) != 0; zval val; int i; if (subpat_names) { @@ -1145,7 +1145,7 @@ static void php_do_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) /* {{{ * } /* }}} */ -static zend_always_inline zend_bool is_known_valid_utf8( +static zend_always_inline bool is_known_valid_utf8( zend_string *subject_str, PCRE2_SIZE start_offset) { if (!(GC_FLAGS(subject_str) & IS_STR_VALID_UTF8)) { /* We don't know whether the string is valid UTF-8 or not. */ @@ -1659,7 +1659,7 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su piece = subject + last_end_offset; if (count >= 0 && limit > 0) { - zend_bool simple_string; + bool simple_string; /* Check for too many substrings condition. */ if (UNEXPECTED(count == 0)) { @@ -1858,7 +1858,7 @@ static zend_string *php_pcre_replace_func_impl(pcre_cache_entry *pce, zend_strin zend_string *result; /* Result of replacement */ zend_string *eval_result; /* Result of custom function */ pcre2_match_data *match_data; - zend_bool old_mdata_used; + bool old_mdata_used; /* Calculate the size of the offsets array, and allocate memory for it. */ num_subpats = pce->capture_count + 1; @@ -2881,7 +2881,7 @@ PHPAPI void php_pcre_grep_impl(pcre_cache_entry *pce, zval *input, zval *return uint32_t options; /* Execution options */ zend_string *string_key; zend_ulong num_key; - zend_bool invert; /* Whether to return non-matching + bool invert; /* Whether to return non-matching entries */ pcre2_match_data *match_data; invert = flags & PREG_GREP_INVERT ? 1 : 0; diff --git a/ext/pcre/php_pcre.h b/ext/pcre/php_pcre.h index e9f5e34ab9..6e49715257 100644 --- a/ext/pcre/php_pcre.h +++ b/ext/pcre/php_pcre.h @@ -77,9 +77,9 @@ ZEND_BEGIN_MODULE_GLOBALS(pcre) zend_long backtrack_limit; zend_long recursion_limit; #ifdef HAVE_PCRE_JIT_SUPPORT - zend_bool jit; + bool jit; #endif - zend_bool per_request_cache; + bool per_request_cache; php_pcre_error_code error_code; /* Used for unmatched subpatterns in OFFSET_CAPTURE mode */ zval unmatched_null_pair; diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 5a2c25e232..e5159bd64d 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -224,7 +224,7 @@ PHP_METHOD(PDO, __construct) { zval *object = ZEND_THIS; pdo_dbh_t *dbh = NULL; - zend_bool is_persistent = 0; + bool is_persistent = 0; char *data_source; size_t data_source_len; char *colon; @@ -1050,7 +1050,7 @@ PHP_METHOD(PDO, query) pdo_stmt_t *stmt; zend_string *statement; zend_long fetch_mode; - zend_bool fetch_mode_is_null = 1; + bool fetch_mode_is_null = 1; zval *args = NULL; uint32_t num_args = 0; pdo_dbh_object_t *dbh_obj = Z_PDO_OBJECT_P(ZEND_THIS); @@ -1399,7 +1399,7 @@ void pdo_dbh_init(void) REGISTER_PDO_CLASS_CONST_LONG("CURSOR_SCROLL", (zend_long)PDO_CURSOR_SCROLL); } -static void dbh_free(pdo_dbh_t *dbh, zend_bool free_persistent) +static void dbh_free(pdo_dbh_t *dbh, bool free_persistent) { int i; diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c index 5017d0cd41..824e055565 100644 --- a/ext/pdo_dblib/dblib_driver.c +++ b/ext/pdo_dblib/dblib_driver.c @@ -145,7 +145,7 @@ static zend_long dblib_handle_doer(pdo_dbh_t *dbh, const char *sql, size_t sql_l static zend_string* dblib_handle_quoter(pdo_dbh_t *dbh, const zend_string *unquoted, enum pdo_param_type paramtype) { pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data; - zend_bool use_national_character_set = 0; + bool use_national_character_set = 0; size_t i; char *q; size_t quotedlen = 0; diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index 858cf53035..02c6dfc4ee 100644 --- a/ext/pdo_firebird/firebird_driver.c +++ b/ext/pdo_firebird/firebird_driver.c @@ -293,7 +293,7 @@ static FbTokenType getToken(const char** begin, const char* end) int preprocess(const char* sql, int sql_len, char* sql_out, HashTable* named_params) { - zend_bool passAsIs = 1, execBlock = 0; + bool passAsIs = 1, execBlock = 0; zend_long pindex = -1; char pname[254], ident[253], ident2[253]; unsigned int l; @@ -825,7 +825,7 @@ static bool firebird_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval * switch (attr) { case PDO_ATTR_AUTOCOMMIT: { - zend_bool bval = zval_get_long(val)? 1 : 0; + bool bval = zval_get_long(val)? 1 : 0; /* ignore if the new value equals the old one */ if (dbh->auto_commit ^ bval) { diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 1c60dd5989..ad27937feb 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -304,7 +304,7 @@ static char *pdo_mysql_last_insert_id(pdo_dbh_t *dbh, const char *name, size_t * static zend_string* mysql_handle_quoter(pdo_dbh_t *dbh, const zend_string *unquoted, enum pdo_param_type paramtype ) { pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; - zend_bool use_national_character_set = 0; + bool use_national_character_set = 0; char *quoted; size_t quotedlen; zend_string *quoted_str; @@ -398,7 +398,7 @@ static inline int mysql_handle_autocommit(pdo_dbh_t *dbh) static bool pdo_mysql_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val) { zend_long lval = zval_get_long(val); - zend_bool bval = lval ? 1 : 0; + bool bval = lval ? 1 : 0; PDO_DBG_ENTER("pdo_mysql_set_attribute"); PDO_DBG_INF_FMT("dbh=%p", dbh); PDO_DBG_INF_FMT("attr=%l", attr); diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index e1f6c6ff95..c35657191f 100644 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -555,7 +555,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori } #ifdef PDO_USE_MYSQLND - zend_bool fetched_anything; + bool fetched_anything; PDO_DBG_ENTER("pdo_mysql_stmt_fetch"); PDO_DBG_INF_FMT("stmt=%p", S->stmt); diff --git a/ext/pdo_mysql/php_pdo_mysql_int.h b/ext/pdo_mysql/php_pdo_mysql_int.h index e83ac735dc..75287e7904 100644 --- a/ext/pdo_mysql/php_pdo_mysql_int.h +++ b/ext/pdo_mysql/php_pdo_mysql_int.h @@ -39,7 +39,7 @@ typedef _Bool my_bool; #define PDO_DBG_INF_FMT(...) do { if (dbg_skip_trace == FALSE) PDO_MYSQL_G(dbg)->m->log_va(PDO_MYSQL_G(dbg), __LINE__, __FILE__, -1, "info : ", __VA_ARGS__); } while (0) #define PDO_DBG_ERR_FMT(...) do { if (dbg_skip_trace == FALSE) PDO_MYSQL_G(dbg)->m->log_va(PDO_MYSQL_G(dbg), __LINE__, __FILE__, -1, "error: ", __VA_ARGS__); } while (0) #define PDO_DBG_ENTER(func_name) \ - zend_bool dbg_skip_trace = TRUE; \ + bool dbg_skip_trace = TRUE; \ ((void) dbg_skip_trace); \ if (PDO_MYSQL_G(dbg)) \ dbg_skip_trace = !PDO_MYSQL_G(dbg)->m->func_enter(PDO_MYSQL_G(dbg), __LINE__, __FILE__, func_name, strlen(func_name)); diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c index 87fe34e287..de021e76fb 100644 --- a/ext/pdo_oci/oci_statement.c +++ b/ext/pdo_oci/oci_statement.c @@ -518,7 +518,7 @@ static int oci_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */ ub2 dtype, data_size, precis; ub4 namelen; struct pdo_column_data *col = &stmt->columns[colno]; - zend_bool dyn = FALSE; + bool dyn = FALSE; /* describe the column */ STMT_CALL(OCIParamGet, (S->stmt, OCI_HTYPE_STMT, S->err, (dvoid*)¶m, colno+1)); diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index 1377f70969..d2cda8572d 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -1155,7 +1155,7 @@ static const zend_function_entry *pdo_pgsql_get_driver_methods(pdo_dbh_t *dbh, i static bool pdo_pgsql_set_attr(pdo_dbh_t *dbh, zend_long attr, zval *val) { - zend_bool bval = zval_get_long(val)? 1 : 0; + bool bval = zval_get_long(val)? 1 : 0; pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data; switch (attr) { diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index c17585f47e..6570a86e14 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -57,7 +57,7 @@ static int pgsql_stmt_dtor(pdo_stmt_t *stmt) { pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data; - zend_bool server_obj_usable = !Z_ISUNDEF(stmt->database_object_handle) + bool server_obj_usable = !Z_ISUNDEF(stmt->database_object_handle) && IS_OBJ_VALID(EG(objects_store).object_buckets[Z_OBJ_HANDLE(stmt->database_object_handle)]) && !(OBJ_FLAGS(Z_OBJ(stmt->database_object_handle)) & IS_OBJ_FREE_CALLED); diff --git a/ext/pdo_pgsql/php_pdo_pgsql_int.h b/ext/pdo_pgsql/php_pdo_pgsql_int.h index b4bc6318e7..16aeb3ca48 100644 --- a/ext/pdo_pgsql/php_pdo_pgsql_int.h +++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h @@ -42,9 +42,9 @@ typedef struct { unsigned int stmt_counter; /* The following two variables have the same purpose. Unfortunately we need to keep track of two different attributes having the same effect. */ - zend_bool emulate_prepares; - zend_bool disable_native_prepares; /* deprecated since 5.6 */ - zend_bool disable_prepares; + bool emulate_prepares; + bool disable_native_prepares; /* deprecated since 5.6 */ + bool disable_prepares; } pdo_pgsql_db_handle; typedef struct { @@ -63,7 +63,7 @@ typedef struct { int *param_formats; Oid *param_types; int current_row; - zend_bool is_prepared; + bool is_prepared; } pdo_pgsql_stmt; typedef struct { diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 9b3471b192..821af14efa 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1547,7 +1547,7 @@ PHP_FUNCTION(pg_field_table) zval *result; pgsql_result_handle *pg_result; zend_long fnum = -1; - zend_bool return_oid = 0; + bool return_oid = 0; Oid oid; smart_str hash_key = {0}; char *table_name; @@ -2614,7 +2614,7 @@ PHP_FUNCTION(pg_lo_write) zval *pgsql_id; char *str; zend_long z_len; - zend_bool z_len_is_null = 1; + bool z_len_is_null = 1; size_t str_len, nbytes; size_t len; pgLofp *pgsql; @@ -4240,7 +4240,7 @@ PHP_FUNCTION(pg_flush) * table_name must not be empty * TODO: Add meta_data cache for better performance */ -PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, zval *meta, zend_bool extended) +PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, zval *meta, bool extended) { PGresult *pg_result; char *src, *tmp_name, *tmp_name2 = NULL; @@ -4355,7 +4355,7 @@ PHP_FUNCTION(pg_meta_data) zval *pgsql_link; char *table_name; size_t table_name_len; - zend_bool extended=0; + bool extended=0; PGconn *pgsql; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|b", @@ -4527,7 +4527,7 @@ static int php_pgsql_convert_match(const char *str, size_t str_len, const char * /* {{{ php_pgsql_add_quote * add quotes around string. */ -static int php_pgsql_add_quotes(zval *src, zend_bool should_free) +static int php_pgsql_add_quotes(zval *src, bool should_free) { smart_str str = {0}; diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h index 3da04282d9..5398a92266 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -176,7 +176,7 @@ PHP_FUNCTION(pg_select); #define PGSQL_DML_ESCAPE (1<<12) /* No convert, but escape only */ /* exported functions */ -PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, zval *meta, zend_bool extended); +PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, zval *meta, bool extended); PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval *values, zval *result, zend_ulong opt); PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *values, zend_ulong opt, zend_string **sql); PHP_PGSQL_API int php_pgsql_update(PGconn *pg_link, const char *table, zval *values, zval *ids, zend_ulong opt , zend_string **sql); diff --git a/ext/phar/dirstream.c b/ext/phar/dirstream.c index 7ddd7b564b..4d2afe0e86 100644 --- a/ext/phar/dirstream.c +++ b/ext/phar/dirstream.c @@ -22,7 +22,7 @@ #include "dirstream.h" BEGIN_EXTERN_C() -void phar_dostat(phar_archive_data *phar, phar_entry_info *data, php_stream_statbuf *ssb, zend_bool is_dir); +void phar_dostat(phar_archive_data *phar, phar_entry_info *data, php_stream_statbuf *ssb, bool is_dir); END_EXTERN_C() const php_stream_ops phar_dir_ops = { diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index 9987f79572..4c7975c318 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -94,11 +94,11 @@ PHAR_FUNC(phar_file_get_contents) /* {{{ */ char *filename; size_t filename_len; zend_string *contents; - zend_bool use_include_path = 0; + bool use_include_path = 0; php_stream *stream; zend_long offset = -1; zend_long maxlen; - zend_bool maxlen_is_null = 1; + bool maxlen_is_null = 1; zval *zcontext = NULL; if (!PHAR_G(intercepted)) { @@ -234,7 +234,7 @@ PHAR_FUNC(phar_readfile) /* {{{ */ char *filename; size_t filename_len; int size = 0; - zend_bool use_include_path = 0; + bool use_include_path = 0; zval *zcontext = NULL; php_stream *stream; @@ -334,7 +334,7 @@ PHAR_FUNC(phar_fopen) /* {{{ */ { char *filename, *mode; size_t filename_len, mode_len; - zend_bool use_include_path = 0; + bool use_include_path = 0; zval *zcontext = NULL; php_stream *stream; diff --git a/ext/phar/phar.c b/ext/phar/phar.c index c01569d308..7aa454c222 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -33,7 +33,7 @@ zend_string *(*phar_save_resolve_path)(const char *filename, size_t filename_len */ static int phar_set_writeable_bit(zval *zv, void *argument) /* {{{ */ { - zend_bool keep = *(zend_bool *)argument; + bool keep = *(bool *)argument; phar_archive_data *phar = (phar_archive_data *)Z_PTR_P(zv); if (!phar->is_data) { @@ -47,7 +47,7 @@ static int phar_set_writeable_bit(zval *zv, void *argument) /* {{{ */ /* if the original value is 0 (disabled), then allow setting/unsetting at will. Otherwise only allow 1 (enabled), and error on disabling */ ZEND_INI_MH(phar_ini_modify_handler) /* {{{ */ { - zend_bool old, ini; + bool old, ini; if (ZSTR_LEN(entry->name) == sizeof("phar.readonly")-1) { old = PHAR_G(readonly_orig); @@ -56,16 +56,16 @@ ZEND_INI_MH(phar_ini_modify_handler) /* {{{ */ } if (ZSTR_LEN(new_value) == 2 && !strcasecmp("on", ZSTR_VAL(new_value))) { - ini = (zend_bool) 1; + ini = (bool) 1; } else if (ZSTR_LEN(new_value) == 3 && !strcasecmp("yes", ZSTR_VAL(new_value))) { - ini = (zend_bool) 1; + ini = (bool) 1; } else if (ZSTR_LEN(new_value) == 4 && !strcasecmp("true", ZSTR_VAL(new_value))) { - ini = (zend_bool) 1; + ini = (bool) 1; } else { - ini = (zend_bool) atoi(ZSTR_VAL(new_value)); + ini = (bool) atoi(ZSTR_VAL(new_value)); } /* do not allow unsetting in runtime */ @@ -495,7 +495,7 @@ void phar_entry_remove(phar_entry_data *idata, char **error) /* {{{ */ /** * Open an already loaded phar */ -int phar_open_parsed_phar(char *fname, size_t fname_len, char *alias, size_t alias_len, zend_bool is_data, uint32_t options, phar_archive_data** pphar, char **error) /* {{{ */ +int phar_open_parsed_phar(char *fname, size_t fname_len, char *alias, size_t alias_len, bool is_data, uint32_t options, phar_archive_data** pphar, char **error) /* {{{ */ { phar_archive_data *phar; #ifdef PHP_WIN32 @@ -601,7 +601,7 @@ void phar_metadata_tracker_try_ensure_has_serialized_data(phar_metadata_tracker */ int phar_metadata_tracker_unserialize_or_copy(phar_metadata_tracker *tracker, zval *metadata, int persistent, HashTable *unserialize_options, const char* method_name) /* {{{ */ { - const zend_bool has_unserialize_options = unserialize_options != NULL && zend_hash_num_elements(unserialize_options) > 0; + const bool has_unserialize_options = unserialize_options != NULL && zend_hash_num_elements(unserialize_options) > 0; /* It should be impossible to create a zval in a persistent phar/entry. */ ZEND_ASSERT(!persistent || Z_ISUNDEF(tracker->val)); @@ -640,7 +640,7 @@ int phar_metadata_tracker_unserialize_or_copy(phar_metadata_tracker *tracker, zv /** * Check if this has any data, serialized or as a raw value. */ -zend_bool phar_metadata_tracker_has_data(const phar_metadata_tracker *tracker, int persistent) /* {{{ */ +bool phar_metadata_tracker_has_data(const phar_metadata_tracker *tracker, int persistent) /* {{{ */ { ZEND_ASSERT(!persistent || Z_ISUNDEF(tracker->val)); return !Z_ISUNDEF(tracker->val) || tracker->str != NULL; @@ -1116,11 +1116,11 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, size_t fname_len, ch /* set up our manifest */ zend_hash_init(&mydata->manifest, manifest_count, - zend_get_hash_value, destroy_phar_manifest_entry, (zend_bool)mydata->is_persistent); + zend_get_hash_value, destroy_phar_manifest_entry, (bool)mydata->is_persistent); zend_hash_init(&mydata->mounted_dirs, 5, - zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); + zend_get_hash_value, NULL, (bool)mydata->is_persistent); zend_hash_init(&mydata->virtual_dirs, manifest_count * 2, - zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); + zend_get_hash_value, NULL, (bool)mydata->is_persistent); mydata->fname = pestrndup(fname, fname_len, mydata->is_persistent); #ifdef PHP_WIN32 phar_unixify_path_separators(mydata->fname, fname_len); @@ -1311,7 +1311,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, size_t fname_len, ch /** * Create or open a phar for writing */ -int phar_open_or_create_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, zend_bool is_data, uint32_t options, phar_archive_data** pphar, char **error) /* {{{ */ +int phar_open_or_create_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, bool is_data, uint32_t options, phar_archive_data** pphar, char **error) /* {{{ */ { const char *ext_str, *z; char *my_error; @@ -1388,7 +1388,7 @@ check_file: } /* }}} */ -int phar_create_or_parse_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, zend_bool is_data, uint32_t options, phar_archive_data** pphar, char **error) /* {{{ */ +int phar_create_or_parse_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, bool is_data, uint32_t options, phar_archive_data** pphar, char **error) /* {{{ */ { phar_archive_data *mydata; php_stream *fp; @@ -1473,7 +1473,7 @@ int phar_create_or_parse_filename(char *fname, size_t fname_len, char *alias, si zend_hash_init(&mydata->mounted_dirs, sizeof(char *), zend_get_hash_value, NULL, 0); zend_hash_init(&mydata->virtual_dirs, sizeof(char *), - zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); + zend_get_hash_value, NULL, (bool)mydata->is_persistent); mydata->fname_len = fname_len; snprintf(mydata->version, sizeof(mydata->version), "%s", PHP_PHAR_API_VERSION); mydata->is_temporary_alias = alias ? 0 : 1; diff --git a/ext/phar/phar_internal.h b/ext/phar/phar_internal.h index f959cb29bc..dab3688ba4 100644 --- a/ext/phar/phar_internal.h +++ b/ext/phar/phar_internal.h @@ -141,9 +141,9 @@ ZEND_BEGIN_MODULE_GLOBALS(phar) int persist; int has_zlib; int has_bz2; - zend_bool readonly_orig; - zend_bool require_hash_orig; - zend_bool intercepted; + bool readonly_orig; + bool require_hash_orig; + bool intercepted; int request_init; int require_hash; int request_done; @@ -532,12 +532,12 @@ void phar_destroy_phar_data(phar_archive_data *phar); int phar_open_entry_file(phar_archive_data *phar, phar_entry_info *entry, char **error); int phar_postprocess_file(phar_entry_data *idata, uint32_t crc32, char **error, int process_zip); int phar_open_from_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, uint32_t options, phar_archive_data** pphar, char **error); -int phar_open_or_create_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, zend_bool is_data, uint32_t options, phar_archive_data** pphar, char **error); -int phar_create_or_parse_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, zend_bool is_data, uint32_t options, phar_archive_data** pphar, char **error); +int phar_open_or_create_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, bool is_data, uint32_t options, phar_archive_data** pphar, char **error); +int phar_create_or_parse_filename(char *fname, size_t fname_len, char *alias, size_t alias_len, bool is_data, uint32_t options, phar_archive_data** pphar, char **error); int phar_open_executed_filename(char *alias, size_t alias_len, char **error); int phar_free_alias(phar_archive_data *phar, char *alias, size_t alias_len); int phar_get_archive(phar_archive_data **archive, char *fname, size_t fname_len, char *alias, size_t alias_len, char **error); -int phar_open_parsed_phar(char *fname, size_t fname_len, char *alias, size_t alias_len, zend_bool is_data, uint32_t options, phar_archive_data** pphar, char **error); +int phar_open_parsed_phar(char *fname, size_t fname_len, char *alias, size_t alias_len, bool is_data, uint32_t options, phar_archive_data** pphar, char **error); int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type, char *sig, size_t sig_len, char *fname, char **signature, size_t *signature_len, char **error); int phar_create_signature(phar_archive_data *phar, php_stream *fp, char **signature, size_t *signature_length, char **error); @@ -553,7 +553,7 @@ zend_string *phar_find_in_include_path(char *file, size_t file_len, phar_archive char *phar_fix_filepath(char *path, size_t *new_len, int use_cwd); phar_entry_info * phar_open_jit(phar_archive_data *phar, phar_entry_info *entry, char **error); void phar_parse_metadata_lazy(const char *buffer, phar_metadata_tracker *tracker, uint32_t zip_metadata_len, int persistent); -zend_bool phar_metadata_tracker_has_data(const phar_metadata_tracker* tracker, int persistent); +bool phar_metadata_tracker_has_data(const phar_metadata_tracker* tracker, int persistent); /* If this has data, free it and set all values to undefined. */ void phar_metadata_tracker_free(phar_metadata_tracker* val, int persistent); void phar_metadata_tracker_copy(phar_metadata_tracker* dest, const phar_metadata_tracker *source, int persistent); diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index a4965d9335..7fa1b963ef 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -395,7 +395,7 @@ PHP_METHOD(Phar, running) { char *fname, *arch, *entry; size_t fname_len, arch_len, entry_len; - zend_bool retphar = 1; + bool retphar = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &retphar) == FAILURE) { RETURN_THROWS(); @@ -1049,7 +1049,7 @@ PHP_METHOD(Phar, isValidPharFilename) size_t fname_len; size_t ext_len; int is_executable; - zend_bool executable = 1; + bool executable = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|b", &fname, &fname_len, &executable) == FAILURE) { RETURN_THROWS(); @@ -1106,7 +1106,7 @@ PHP_METHOD(Phar, __construct) char *fname, *alias = NULL, *error, *arch = NULL, *entry = NULL, *save_fname; size_t fname_len, alias_len = 0; size_t arch_len, entry_len; - zend_bool is_data; + bool is_data; zend_long flags = SPL_FILE_DIR_SKIPDOTS|SPL_FILE_DIR_UNIXPATHS; zend_long format = 0; phar_archive_object *phar_obj; @@ -1376,7 +1376,7 @@ struct _phar_t { static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ { zval *value; - zend_bool close_fp = 1; + bool close_fp = 1; struct _phar_t *p_obj = (struct _phar_t*) puser; size_t str_key_len, base_len = p_obj->l; phar_entry_data *data; @@ -1698,7 +1698,7 @@ PHP_METHOD(Phar, buildFromDirectory) { char *dir, *error, *regex = NULL; size_t dir_len, regex_len = 0; - zend_bool apply_reg = 0; + bool apply_reg = 0; zval arg, arg2, iter, iteriter, regexiter; struct _phar_t pass; @@ -2341,7 +2341,7 @@ PHP_METHOD(Phar, convertToExecutable) uint32_t flags; zend_object *ret; zend_long format, method; - zend_bool format_is_null = 1, method_is_null = 1; + bool format_is_null = 1, method_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!l!s!", &format, &format_is_null, &method, &method_is_null, &ext, &ext_len) == FAILURE) { RETURN_THROWS(); @@ -2452,7 +2452,7 @@ PHP_METHOD(Phar, convertToData) uint32_t flags; zend_object *ret; zend_long format, method; - zend_bool format_is_null = 1, method_is_null = 1; + bool format_is_null = 1, method_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!l!s!", &format, &format_is_null, &method, &method_is_null, &ext, &ext_len) == FAILURE) { RETURN_THROWS(); @@ -4097,7 +4097,7 @@ PHP_METHOD(Phar, delMetadata) } /* }}} */ -static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char *dest, size_t dest_len, char **error) /* {{{ */ +static int phar_extract_file(bool overwrite, phar_entry_info *entry, char *dest, size_t dest_len, char **error) /* {{{ */ { php_stream_statbuf ssb; size_t len; @@ -4279,7 +4279,7 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char * } /* }}} */ -static int extract_helper(phar_archive_data *archive, zend_string *search, char *pathto, size_t pathto_len, zend_bool overwrite, char **error) { /* {{{ */ +static int extract_helper(phar_archive_data *archive, zend_string *search, char *pathto, size_t pathto_len, bool overwrite, char **error) { /* {{{ */ int extracted = 0; phar_entry_info *entry; @@ -4319,7 +4319,7 @@ PHP_METHOD(Phar, extractTo) int ret; zval *zval_file; HashTable *files_ht = NULL; - zend_bool overwrite = 0; + bool overwrite = 0; char *error = NULL; ZEND_PARSE_PARAMETERS_START(1, 3) @@ -4524,7 +4524,7 @@ PHP_METHOD(PharFileInfo, getCompressedSize) PHP_METHOD(PharFileInfo, isCompressed) { zend_long method; - zend_bool method_is_null = 1; + bool method_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &method, &method_is_null) == FAILURE) { RETURN_THROWS(); diff --git a/ext/phar/stream.c b/ext/phar/stream.c index 91ed30cf03..5fac84da32 100644 --- a/ext/phar/stream.c +++ b/ext/phar/stream.c @@ -480,7 +480,7 @@ static int phar_stream_flush(php_stream *stream) /* {{{ */ /** * stat an opened phar file handle stream, used by phar_stat() */ -void phar_dostat(phar_archive_data *phar, phar_entry_info *data, php_stream_statbuf *ssb, zend_bool is_temp_dir) +void phar_dostat(phar_archive_data *phar, phar_entry_info *data, php_stream_statbuf *ssb, bool is_temp_dir) { memset(ssb, 0, sizeof(php_stream_statbuf)); diff --git a/ext/phar/tar.c b/ext/phar/tar.c index bae1a4bf7b..890a90b515 100644 --- a/ext/phar/tar.c +++ b/ext/phar/tar.c @@ -242,11 +242,11 @@ int phar_parse_tarfile(php_stream* fp, char *fname, size_t fname_len, char *alia myphar->is_persistent = PHAR_G(persist); /* estimate number of entries, can't be certain with tar files */ zend_hash_init(&myphar->manifest, 2 + (totalsize >> 12), - zend_get_hash_value, destroy_phar_manifest_entry, (zend_bool)myphar->is_persistent); + zend_get_hash_value, destroy_phar_manifest_entry, (bool)myphar->is_persistent); zend_hash_init(&myphar->mounted_dirs, 5, - zend_get_hash_value, NULL, (zend_bool)myphar->is_persistent); + zend_get_hash_value, NULL, (bool)myphar->is_persistent); zend_hash_init(&myphar->virtual_dirs, 4 + (totalsize >> 11), - zend_get_hash_value, NULL, (zend_bool)myphar->is_persistent); + zend_get_hash_value, NULL, (bool)myphar->is_persistent); myphar->is_tar = 1; /* remember whether this entire phar was compressed with gz/bzip2 */ myphar->flags = compression; diff --git a/ext/phar/zip.c b/ext/phar/zip.c index eb683a886c..de37faaab7 100644 --- a/ext/phar/zip.c +++ b/ext/phar/zip.c @@ -303,11 +303,11 @@ foundit: php_stream_seek(fp, PHAR_GET_32(locator.cdir_offset), SEEK_SET); /* read in central directory */ zend_hash_init(&mydata->manifest, PHAR_GET_16(locator.count), - zend_get_hash_value, destroy_phar_manifest_entry, (zend_bool)mydata->is_persistent); + zend_get_hash_value, destroy_phar_manifest_entry, (bool)mydata->is_persistent); zend_hash_init(&mydata->mounted_dirs, 5, - zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); + zend_get_hash_value, NULL, (bool)mydata->is_persistent); zend_hash_init(&mydata->virtual_dirs, PHAR_GET_16(locator.count) * 2, - zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); + zend_get_hash_value, NULL, (bool)mydata->is_persistent); entry.phar = mydata; entry.is_zip = 1; entry.fp_type = PHAR_FP; diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c index 4253f5f159..8975519955 100644 --- a/ext/pspell/pspell.c +++ b/ext/pspell/pspell.c @@ -645,7 +645,7 @@ PHP_FUNCTION(pspell_config_create) PHP_FUNCTION(pspell_config_runtogether) { zval *zcfg; - zend_bool runtogether; + bool runtogether; PspellConfig *config; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &zcfg, php_pspell_config_ce, &runtogether) == FAILURE) { @@ -773,7 +773,7 @@ PHP_FUNCTION(pspell_config_repl) PHP_FUNCTION(pspell_config_save_repl) { zval *zcfg; - zend_bool save; + bool save; PspellConfig *config; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &zcfg, php_pspell_config_ce, &save) == FAILURE) { diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 4debb4c7e6..90470acdc2 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -48,7 +48,7 @@ /* Key used to avoid leaking addresses in ReflectionProperty::getId() */ #define REFLECTION_KEY_LEN 16 ZEND_BEGIN_MODULE_GLOBALS(reflection) - zend_bool key_initialized; + bool key_initialized; unsigned char key[REFLECTION_KEY_LEN]; ZEND_END_MODULE_GLOBALS(reflection) ZEND_DECLARE_MODULE_GLOBALS(reflection) @@ -125,7 +125,7 @@ typedef struct _property_reference { /* Struct for parameters */ typedef struct _parameter_reference { uint32_t offset; - zend_bool required; + bool required; struct _zend_arg_info *arg_info; zend_function *fptr; } parameter_reference; @@ -134,7 +134,7 @@ typedef struct _parameter_reference { typedef struct _type_reference { zend_type type; /* Whether to use backwards compatible null representation */ - zend_bool legacy_behavior; + bool legacy_behavior; } type_reference; /* Struct for attributes */ @@ -180,7 +180,7 @@ static zend_always_inline uint32_t prop_get_flags(property_reference *ref) { return ref->prop ? ref->prop->flags : ZEND_ACC_PUBLIC; } -static inline zend_bool is_closure_invoke(zend_class_entry *ce, zend_string *lcname) { +static inline bool is_closure_invoke(zend_class_entry *ce, zend_string *lcname) { return ce == zend_ce_closure && zend_string_equals_literal(lcname, ZEND_INVOKE_FUNC_NAME); } @@ -645,13 +645,13 @@ static int format_default_value(smart_str *str, zval *value, zend_class_entry *s return SUCCESS; } -static inline zend_bool has_internal_arg_info(const zend_function *fptr) { +static inline bool has_internal_arg_info(const zend_function *fptr) { return fptr->type == ZEND_INTERNAL_FUNCTION && !(fptr->common.fn_flags & ZEND_ACC_USER_ARG_INFO); } /* {{{ _parameter_string */ -static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_arg_info *arg_info, uint32_t offset, zend_bool required, char* indent) +static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_arg_info *arg_info, uint32_t offset, bool required, char* indent) { smart_str_append_printf(str, "Parameter #%d [ ", offset); if (!required) { @@ -1277,7 +1277,7 @@ static void reflection_extension_factory(zval *object, const char *name_str) /* }}} */ /* {{{ reflection_parameter_factory */ -static void reflection_parameter_factory(zend_function *fptr, zval *closure_object, struct _zend_arg_info *arg_info, uint32_t offset, zend_bool required, zval *object) +static void reflection_parameter_factory(zend_function *fptr, zval *closure_object, struct _zend_arg_info *arg_info, uint32_t offset, bool required, zval *object) { reflection_object *intern; parameter_reference *reference; @@ -1309,7 +1309,7 @@ static void reflection_parameter_factory(zend_function *fptr, zval *closure_obje /* For backwards compatibility reasons, we need to return T|null style unions * as a ReflectionNamedType. Here we determine what counts as a union type and * what doesn't. */ -static zend_bool is_union_type(zend_type type) { +static bool is_union_type(zend_type type) { if (ZEND_TYPE_HAS_LIST(type)) { return 1; } @@ -1325,12 +1325,12 @@ static zend_bool is_union_type(zend_type type) { } /* {{{ reflection_type_factory */ -static void reflection_type_factory(zend_type type, zval *object, zend_bool legacy_behavior) +static void reflection_type_factory(zend_type type, zval *object, bool legacy_behavior) { reflection_object *intern; type_reference *reference; - zend_bool is_union = is_union_type(type); - zend_bool is_mixed = ZEND_TYPE_PURE_MASK(type) == MAY_BE_ANY; + bool is_union = is_union_type(type); + bool is_mixed = ZEND_TYPE_PURE_MASK(type) == MAY_BE_ANY; reflection_instantiate(is_union && !is_mixed ? reflection_union_type_ptr : reflection_named_type_ptr, object); intern = Z_REFLECTION_P(object); @@ -2240,7 +2240,7 @@ ZEND_METHOD(ReflectionParameter, __construct) struct _zend_arg_info *arg_info; uint32_t num_args; zend_class_entry *ce = NULL; - zend_bool is_closure = 0; + bool is_closure = 0; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_ZVAL(reference) @@ -3508,7 +3508,7 @@ ZEND_METHOD(ReflectionMethod, getPrototype) ZEND_METHOD(ReflectionMethod, setAccessible) { reflection_object *intern; - zend_bool visible; + bool visible; if (zend_parse_parameters(ZEND_NUM_ARGS(), "b", &visible) == FAILURE) { RETURN_THROWS(); @@ -3755,7 +3755,7 @@ ZEND_METHOD(ReflectionClass, __construct) /* }}} */ /* {{{ add_class_vars */ -static void add_class_vars(zend_class_entry *ce, zend_bool statics, zval *return_value) +static void add_class_vars(zend_class_entry *ce, bool statics, zval *return_value) { zend_property_info *prop_info; zval *prop, prop_copy; @@ -3767,7 +3767,7 @@ static void add_class_vars(zend_class_entry *ce, zend_bool statics, zval *return continue; } - zend_bool is_static = (prop_info->flags & ZEND_ACC_STATIC) != 0; + bool is_static = (prop_info->flags & ZEND_ACC_STATIC) != 0; if (statics != is_static) { continue; } @@ -4199,7 +4199,7 @@ ZEND_METHOD(ReflectionClass, getMethods) zend_class_entry *ce; zend_function *mptr; zend_long filter; - zend_bool filter_is_null = 1; + bool filter_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { RETURN_THROWS(); @@ -4217,7 +4217,7 @@ ZEND_METHOD(ReflectionClass, getMethods) } ZEND_HASH_FOREACH_END(); if (instanceof_function(ce, zend_ce_closure)) { - zend_bool has_obj = Z_TYPE(intern->obj) != IS_UNDEF; + bool has_obj = Z_TYPE(intern->obj) != IS_UNDEF; zval obj_tmp; zend_object *obj; if (!has_obj) { @@ -4375,7 +4375,7 @@ ZEND_METHOD(ReflectionClass, getProperties) zend_string *key; zend_property_info *prop_info; zend_long filter; - zend_bool filter_is_null = 1; + bool filter_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { RETURN_THROWS(); @@ -4431,7 +4431,7 @@ ZEND_METHOD(ReflectionClass, getConstants) zend_class_constant *constant; zval val; zend_long filter; - zend_bool filter_is_null = 1; + bool filter_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { RETURN_THROWS(); @@ -4465,7 +4465,7 @@ ZEND_METHOD(ReflectionClass, getReflectionConstants) zend_string *name; zend_class_constant *constant; zend_long filter; - zend_bool filter_is_null = 1; + bool filter_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { RETURN_THROWS(); @@ -5511,7 +5511,7 @@ ZEND_METHOD(ReflectionProperty, getAttributes) ZEND_METHOD(ReflectionProperty, setAccessible) { reflection_object *intern; - zend_bool visible; + bool visible; if (zend_parse_parameters(ZEND_NUM_ARGS(), "b", &visible) == FAILURE) { RETURN_THROWS(); @@ -5789,7 +5789,7 @@ ZEND_METHOD(ReflectionExtension, getINIEntries) /* }}} */ /* {{{ add_extension_class */ -static void add_extension_class(zend_class_entry *ce, zend_string *key, zval *class_array, zend_module_entry *module, zend_bool add_reflection_class) +static void add_extension_class(zend_class_entry *ce, zend_string *key, zval *class_array, zend_module_entry *module, bool add_reflection_class) { if (ce->type == ZEND_INTERNAL_CLASS && ce->info.internal.module && !strcasecmp(ce->info.internal.module->name, module->name)) { zend_string *name; @@ -6108,7 +6108,7 @@ ZEND_METHOD(ReflectionReference, __construct) } /* }}} */ -static zend_bool is_ignorable_reference(HashTable *ht, zval *ref) { +static bool is_ignorable_reference(HashTable *ht, zval *ref) { if (Z_REFCOUNT_P(ref) != 1) { return 0; } diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index b41b742cba..977d0c0157 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -108,7 +108,7 @@ PS_OPEN_FUNC(user) PS_CLOSE_FUNC(user) { - zend_bool bailout = 0; + bool bailout = 0; STDVARS; if (!PS(mod_user_implemented)) { diff --git a/ext/session/php_session.h b/ext/session/php_session.h index c365975fb5..a18b075dab 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -128,8 +128,8 @@ typedef struct _php_session_rfc1867_progress { zend_long update_step; zend_long next_update; double next_update_time; - zend_bool cancel_upload; - zend_bool apply_trans_sid; + bool cancel_upload; + bool apply_trans_sid; size_t content_length; zval data; /* the array exported to session data */ @@ -148,8 +148,8 @@ typedef struct _php_ps_globals { zend_long cookie_lifetime; char *cookie_path; char *cookie_domain; - zend_bool cookie_secure; - zend_bool cookie_httponly; + bool cookie_secure; + bool cookie_httponly; char *cookie_samesite; const ps_module *mod; const ps_module *default_mod; @@ -178,10 +178,10 @@ typedef struct _php_ps_globals { int mod_user_is_open; const struct ps_serializer_struct *serializer; zval http_session_vars; - zend_bool auto_start; - zend_bool use_cookies; - zend_bool use_only_cookies; - zend_bool use_trans_sid; /* contains the INI value of whether to use trans-sid */ + bool auto_start; + bool use_cookies; + bool use_only_cookies; + bool use_trans_sid; /* contains the INI value of whether to use trans-sid */ zend_long sid_length; zend_long sid_bits_per_character; @@ -189,17 +189,17 @@ typedef struct _php_ps_globals { int define_sid; php_session_rfc1867_progress *rfc1867_progress; - zend_bool rfc1867_enabled; /* session.upload_progress.enabled */ - zend_bool rfc1867_cleanup; /* session.upload_progress.cleanup */ + bool rfc1867_enabled; /* session.upload_progress.enabled */ + bool rfc1867_cleanup; /* session.upload_progress.cleanup */ char *rfc1867_prefix; /* session.upload_progress.prefix */ char *rfc1867_name; /* session.upload_progress.name */ zend_long rfc1867_freq; /* session.upload_progress.freq */ double rfc1867_min_freq; /* session.upload_progress.min_freq */ - zend_bool use_strict_mode; /* whether or not PHP accepts unknown session ids */ - zend_bool lazy_write; /* omit session write when it is possible */ - zend_bool in_save_handler; /* state if session is in save handler or not */ - zend_bool set_handler; /* state if session module i setting handler or not */ + bool use_strict_mode; /* whether or not PHP accepts unknown session ids */ + bool lazy_write; /* omit session write when it is possible */ + bool in_save_handler; /* state if session is in save handler or not */ + bool set_handler; /* state if session module i setting handler or not */ zend_string *session_vars; /* serialized original session data */ } php_ps_globals; diff --git a/ext/session/session.c b/ext/session/session.c index dd57b6ad05..5eda7eae8e 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -359,7 +359,7 @@ PHPAPI int php_session_valid_key(const char *key) /* {{{ */ /* }}} */ -static zend_long php_session_gc(zend_bool immediate) /* {{{ */ +static zend_long php_session_gc(bool immediate) /* {{{ */ { int nrand; zend_long num = -1; @@ -605,9 +605,9 @@ static PHP_INI_MH(OnUpdateTransSid) /* {{{ */ SESSION_CHECK_OUTPUT_STATE; if (!strncasecmp(ZSTR_VAL(new_value), "on", sizeof("on"))) { - PS(use_trans_sid) = (zend_bool) 1; + PS(use_trans_sid) = (bool) 1; } else { - PS(use_trans_sid) = (zend_bool) atoi(ZSTR_VAL(new_value)); + PS(use_trans_sid) = (bool) atoi(ZSTR_VAL(new_value)); } return SUCCESS; @@ -1428,7 +1428,7 @@ PHPAPI int php_session_reset_id(void) /* {{{ */ { int module_number = PS(module_number); zval *sid, *data, *ppid; - zend_bool apply_trans_sid; + bool apply_trans_sid; if (!PS(id)) { php_error_docref(NULL, E_WARNING, "Cannot set session ID - session ID is not initialized"); @@ -1674,8 +1674,8 @@ PHP_FUNCTION(session_set_cookie_params) HashTable *options_ht; zend_long lifetime_long; zend_string *lifetime = NULL, *path = NULL, *domain = NULL, *samesite = NULL; - zend_bool secure = 0, secure_null = 1; - zend_bool httponly = 0, httponly_null = 1; + bool secure = 0, secure_null = 1; + bool httponly = 0, httponly_null = 1; zend_string *ini_name; int result; int found = 0; @@ -1961,7 +1961,7 @@ PHP_FUNCTION(session_set_save_handler) zval *obj = NULL; zend_string *func_name; zend_function *current_mptr; - zend_bool register_shutdown = 1; + bool register_shutdown = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|b", &obj, php_session_iface_entry, ®ister_shutdown) == FAILURE) { RETURN_THROWS(); @@ -2184,7 +2184,7 @@ PHP_FUNCTION(session_id) /* {{{ Update the current session id with a newly generated one. If delete_old_session is set to true, remove the old session. */ PHP_FUNCTION(session_regenerate_id) { - zend_bool del_ses = 0; + bool del_ses = 0; zend_string *data; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &del_ses) == FAILURE) { @@ -2378,7 +2378,7 @@ PHP_FUNCTION(session_cache_limiter) PHP_FUNCTION(session_cache_expire) { zend_long expires; - zend_bool expires_is_null = 1; + bool expires_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &expires, &expires_is_null) == FAILURE) { RETURN_THROWS(); @@ -2686,7 +2686,7 @@ PHP_FUNCTION(session_register_shutdown) * Module Setup and Destruction * ******************************** */ -static int php_rinit_session(zend_bool auto_start) /* {{{ */ +static int php_rinit_session(bool auto_start) /* {{{ */ { php_rinit_session_globals(); @@ -2903,7 +2903,7 @@ static const zend_module_dep session_deps[] = { /* {{{ */ * Upload hook handling * ************************ */ -static zend_bool early_find_sid_in(zval *dest, int where, php_session_rfc1867_progress *progress) /* {{{ */ +static bool early_find_sid_in(zval *dest, int where, php_session_rfc1867_progress *progress) /* {{{ */ { zval *ppid; @@ -2938,7 +2938,7 @@ static void php_session_rfc1867_early_find_sid(php_session_rfc1867_progress *pro early_find_sid_in(&progress->sid, TRACK_VARS_GET, progress); } /* }}} */ -static zend_bool php_check_cancel_upload(php_session_rfc1867_progress *progress) /* {{{ */ +static bool php_check_cancel_upload(php_session_rfc1867_progress *progress) /* {{{ */ { zval *progress_ary, *cancel_upload; diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index c941e43ad3..32899e576c 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -218,7 +218,7 @@ next_iter: /* }}} */ /* {{{ sxe_prop_dim_read() */ -static zval *sxe_prop_dim_read(zend_object *object, zval *member, zend_bool elements, zend_bool attribs, int type, zval *rv) +static zval *sxe_prop_dim_read(zend_object *object, zval *member, bool elements, bool attribs, int type, zval *rv) { php_sxe_object *sxe; char *name; @@ -386,7 +386,7 @@ static void change_node_zval(xmlNodePtr node, zend_string *value) /* }}} */ /* {{{ sxe_property_write() */ -static zval *sxe_prop_dim_write(zend_object *object, zval *member, zval *value, zend_bool elements, zend_bool attribs, xmlNodePtr *pnewnode) +static zval *sxe_prop_dim_write(zend_object *object, zval *member, zval *value, bool elements, bool attribs, xmlNodePtr *pnewnode) { php_sxe_object *sxe; xmlNodePtr node; @@ -674,7 +674,7 @@ static zval *sxe_property_get_adr(zend_object *object, zend_string *zname, int f /* }}} */ /* {{{ sxe_prop_dim_exists() */ -static int sxe_prop_dim_exists(zend_object *object, zval *member, int check_empty, zend_bool elements, zend_bool attribs) +static int sxe_prop_dim_exists(zend_object *object, zval *member, int check_empty, bool elements, bool attribs) { php_sxe_object *sxe; xmlNodePtr node; @@ -795,7 +795,7 @@ static int sxe_dimension_exists(zend_object *object, zval *member, int check_emp /* }}} */ /* {{{ sxe_prop_dim_delete() */ -static void sxe_prop_dim_delete(zend_object *object, zval *member, zend_bool elements, zend_bool attribs) +static void sxe_prop_dim_delete(zend_object *object, zval *member, bool elements, bool attribs) { php_sxe_object *sxe; xmlNodePtr node; @@ -1479,7 +1479,7 @@ static inline void sxe_add_namespace_name(zval *return_value, xmlNsPtr ns) /* {{ } /* }}} */ -static void sxe_add_namespaces(php_sxe_object *sxe, xmlNodePtr node, zend_bool recursive, zval *return_value) /* {{{ */ +static void sxe_add_namespaces(php_sxe_object *sxe, xmlNodePtr node, bool recursive, zval *return_value) /* {{{ */ { xmlAttrPtr attr; @@ -1509,7 +1509,7 @@ static void sxe_add_namespaces(php_sxe_object *sxe, xmlNodePtr node, zend_bool r /* {{{ Return all namespaces in use */ SXE_METHOD(getNamespaces) { - zend_bool recursive = 0; + bool recursive = 0; php_sxe_object *sxe; xmlNodePtr node; @@ -1533,7 +1533,7 @@ SXE_METHOD(getNamespaces) } /* }}} */ -static void sxe_add_registered_namespaces(php_sxe_object *sxe, xmlNodePtr node, zend_bool recursive, zval *return_value) /* {{{ */ +static void sxe_add_registered_namespaces(php_sxe_object *sxe, xmlNodePtr node, bool recursive, zval *return_value) /* {{{ */ { xmlNsPtr ns; @@ -1557,7 +1557,7 @@ static void sxe_add_registered_namespaces(php_sxe_object *sxe, xmlNodePtr node, /* {{{ Return all namespaces registered with document */ SXE_METHOD(getDocNamespaces) { - zend_bool recursive = 0, from_root = 1; + bool recursive = 0, from_root = 1; php_sxe_object *sxe; xmlNodePtr node; @@ -1593,7 +1593,7 @@ SXE_METHOD(children) char *nsprefix = NULL; size_t nsprefix_len = 0; xmlNodePtr node; - zend_bool isprefix = 0; + bool isprefix = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!b", &nsprefix, &nsprefix_len, &isprefix) == FAILURE) { RETURN_THROWS(); @@ -1647,7 +1647,7 @@ SXE_METHOD(attributes) char *nsprefix = NULL; size_t nsprefix_len = 0; xmlNodePtr node; - zend_bool isprefix = 0; + bool isprefix = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!b", &nsprefix, &nsprefix_len, &isprefix) == FAILURE) { RETURN_THROWS(); @@ -2109,7 +2109,7 @@ sxe_object_clone(zend_object *object) php_sxe_object *clone; xmlNodePtr nodep = NULL; xmlDocPtr docp = NULL; - zend_bool is_root_element = sxe->node && sxe->node->node && sxe->node->node->parent + bool is_root_element = sxe->node && sxe->node->node && sxe->node->node->parent && (sxe->node->node->parent->type == XML_DOCUMENT_NODE || sxe->node->node->parent->type == XML_HTML_DOCUMENT_NODE); clone = php_sxe_object_new(sxe->zo.ce, sxe->fptr_count); @@ -2267,7 +2267,7 @@ PHP_FUNCTION(simplexml_load_file) zend_long options = 0; zend_class_entry *ce= sxe_class_entry; zend_function *fptr_count; - zend_bool isprefix = 0; + bool isprefix = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|C!lsb", &filename, &filename_len, &ce, &options, &ns, &ns_len, &isprefix) == FAILURE) { RETURN_THROWS(); @@ -2312,7 +2312,7 @@ PHP_FUNCTION(simplexml_load_string) zend_long options = 0; zend_class_entry *ce= sxe_class_entry; zend_function *fptr_count; - zend_bool isprefix = 0; + bool isprefix = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|C!lsb", &data, &data_len, &ce, &options, &ns, &ns_len, &isprefix) == FAILURE) { RETURN_THROWS(); @@ -2361,7 +2361,7 @@ SXE_METHOD(__construct) size_t data_len, ns_len = 0; xmlDocPtr docp; zend_long options = 0; - zend_bool is_url = 0, isprefix = 0; + bool is_url = 0, isprefix = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|lbsb", &data, &data_len, &options, &is_url, &ns, &ns_len, &isprefix) == FAILURE) { RETURN_THROWS(); diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index e217f95961..44452369c9 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -1101,7 +1101,7 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version) HashTable *oid_ht, *type_ht = NULL, *value_ht = NULL; char *a1 = NULL, *a2 = NULL, *a3 = NULL, *a4 = NULL, *a5 = NULL, *a6 = NULL, *a7 = NULL; size_t a1_len, a2_len, a3_len, a4_len, a5_len, a6_len, a7_len; - zend_bool use_orignames = 0, suffix_keys = 0; + bool use_orignames = 0, suffix_keys = 0; zend_long timeout = SNMP_DEFAULT_TIMEOUT; zend_long retries = SNMP_DEFAULT_RETRIES; struct objid_query objid_query; @@ -1324,7 +1324,7 @@ PHP_FUNCTION(snmp_get_quick_print) /* {{{ Return all objects including their respective object id within the specified one */ PHP_FUNCTION(snmp_set_quick_print) { - zend_bool a1; + bool a1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "b", &a1) == FAILURE) { RETURN_THROWS(); @@ -1338,7 +1338,7 @@ PHP_FUNCTION(snmp_set_quick_print) /* {{{ Return all values that are enums with their enum value instead of the raw integer */ PHP_FUNCTION(snmp_set_enum_print) { - zend_bool a1; + bool a1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "b", &a1) == FAILURE) { RETURN_THROWS(); diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index b3dd853298..9ed92672db 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -279,7 +279,7 @@ static encodePtr find_encoder_by_type_name(sdlPtr sdl, const char *type) return NULL; } -static zend_bool soap_check_zval_ref(zval *data, xmlNodePtr node) { +static bool soap_check_zval_ref(zval *data, xmlNodePtr node) { xmlNodePtr node_ptr; if (SOAP_GLOBAL(ref_map)) { @@ -344,7 +344,7 @@ static zend_bool soap_check_zval_ref(zval *data, xmlNodePtr node) { return 0; } -static zend_bool soap_check_xml_ref(zval *data, xmlNodePtr node) +static bool soap_check_xml_ref(zval *data, xmlNodePtr node) { zval *data_ptr; diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 1da286ad87..b14c8cc1a1 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -88,9 +88,9 @@ int basic_authentication(zval* this_ptr, smart_str* soap_headers) /* Additional HTTP headers */ void http_context_headers(php_stream_context* context, - zend_bool has_authorization, - zend_bool has_proxy_authorization, - zend_bool has_cookies, + bool has_authorization, + bool has_proxy_authorization, + bool has_cookies, smart_str* soap_headers) { zval *tmp; @@ -359,11 +359,11 @@ int make_http_soap_request(zval *this_ptr, zend_long redirect_max = 20; char *content_encoding; char *http_msg = NULL; - zend_bool old_allow_url_fopen; + bool old_allow_url_fopen; php_stream_context *context = NULL; - zend_bool has_authorization = 0; - zend_bool has_proxy_authorization = 0; - zend_bool has_cookies = 0; + bool has_authorization = 0; + bool has_proxy_authorization = 0; + bool has_cookies = 0; if (this_ptr == NULL || Z_TYPE_P(this_ptr) != IS_OBJECT) { return FALSE; diff --git a/ext/soap/php_http.h b/ext/soap/php_http.h index 8065fef7c9..685d9da180 100644 --- a/ext/soap/php_http.h +++ b/ext/soap/php_http.h @@ -29,8 +29,8 @@ int make_http_soap_request(zval *this_ptr, int proxy_authentication(zval* this_ptr, smart_str* soap_headers); int basic_authentication(zval* this_ptr, smart_str* soap_headers); void http_context_headers(php_stream_context* context, - zend_bool has_authorization, - zend_bool has_proxy_authorization, - zend_bool has_cookies, + bool has_authorization, + bool has_proxy_authorization, + bool has_cookies, smart_str* soap_headers); #endif diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index a331e7be01..936a304ccc 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -3169,8 +3169,8 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl) smart_str headers = {0}; char* key = NULL; time_t t = time(0); - zend_bool has_proxy_authorization = 0; - zend_bool has_authorization = 0; + bool has_proxy_authorization = 0; + bool has_authorization = 0; ZVAL_UNDEF(&orig_context); ZVAL_UNDEF(&new_context); diff --git a/ext/soap/php_sdl.h b/ext/soap/php_sdl.h index bd55a9618c..e3b222ebdc 100644 --- a/ext/soap/php_sdl.h +++ b/ext/soap/php_sdl.h @@ -58,7 +58,7 @@ struct _sdl { HashTable *groups; /* array of sdlTypesPtr */ char *target_ns; char *source; - zend_bool is_persistent; + bool is_persistent; }; typedef struct sdlCtx { diff --git a/ext/soap/php_soap.h b/ext/soap/php_soap.h index 652174fb3d..0b30e7ea9c 100644 --- a/ext/soap/php_soap.h +++ b/ext/soap/php_soap.h @@ -159,7 +159,7 @@ ZEND_BEGIN_MODULE_GLOBALS(soap) int cur_uniq_ns; int soap_version; sdlPtr sdl; - zend_bool use_soap_error_handler; + bool use_soap_error_handler; char* error_code; zval error_object; char cache; diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c index df55678159..d5faa53694 100644 --- a/ext/soap/php_xml.c +++ b/ext/soap/php_xml.c @@ -78,7 +78,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename) { xmlParserCtxtPtr ctxt = NULL; xmlDocPtr ret; - zend_bool old_allow_url_fopen; + bool old_allow_url_fopen; /* xmlInitParser(); @@ -89,7 +89,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename) ctxt = xmlCreateFileParserCtxt(filename); PG(allow_url_fopen) = old_allow_url_fopen; if (ctxt) { - zend_bool old; + bool old; ctxt->keepBlanks = 0; ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace; @@ -137,7 +137,7 @@ xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size) */ ctxt = xmlCreateMemoryParserCtxt(buf, buf_size); if (ctxt) { - zend_bool old; + bool old; ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace; ctxt->sax->comment = soap_Comment; diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 861d8ebf5d..9f19b63177 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -71,7 +71,7 @@ static void delete_hashtable(void *hashtable); static void soap_error_handler(int error_num, const char *error_filename, const uint32_t error_lineno, zend_string *message); #define SOAP_SERVER_BEGIN_CODE() \ - zend_bool _old_handler = SOAP_GLOBAL(use_soap_error_handler);\ + bool _old_handler = SOAP_GLOBAL(use_soap_error_handler);\ char* _old_error_code = SOAP_GLOBAL(error_code);\ zend_object* _old_error_object = Z_OBJ(SOAP_GLOBAL(error_object));\ int _old_soap_version = SOAP_GLOBAL(soap_version);\ @@ -86,11 +86,11 @@ static void soap_error_handler(int error_num, const char *error_filename, const SOAP_GLOBAL(soap_version) = _old_soap_version; #define SOAP_CLIENT_BEGIN_CODE() \ - zend_bool _old_handler = SOAP_GLOBAL(use_soap_error_handler);\ + bool _old_handler = SOAP_GLOBAL(use_soap_error_handler);\ char* _old_error_code = SOAP_GLOBAL(error_code);\ zend_object* _old_error_object = Z_OBJ(SOAP_GLOBAL(error_object));\ int _old_soap_version = SOAP_GLOBAL(soap_version);\ - zend_bool _old_in_compilation = CG(in_compilation); \ + bool _old_in_compilation = CG(in_compilation); \ zend_execute_data *_old_current_execute_data = EG(current_execute_data); \ zval *_old_stack_top = EG(vm_stack_top); \ int _bailout = 0;\ @@ -544,10 +544,10 @@ PHP_METHOD(SoapHeader, __construct) zval *data = NULL; zend_string *actor_str = NULL; zend_long actor_long; - zend_bool actor_is_null = 1; + bool actor_is_null = 1; char *name, *ns; size_t name_len, ns_len; - zend_bool must_understand = 0; + bool must_understand = 0; zval *this_ptr; ZEND_PARSE_PARAMETERS_START(2, 5) @@ -689,7 +689,7 @@ PHP_METHOD(SoapVar, __construct) { zval *data, *this_ptr; zend_long type; - zend_bool type_is_null = 1; + bool type_is_null = 1; char *stype = NULL, *ns = NULL, *name = NULL, *namens = NULL; size_t stype_len = 0, ns_len = 0, name_len = 0, namens_len = 0; @@ -1823,7 +1823,7 @@ static ZEND_NORETURN void soap_server_fault(char* code, char* string, char *acto static zend_never_inline ZEND_COLD void soap_real_error_handler(int error_num, const char *error_filename, const uint32_t error_lineno, zend_string *message) /* {{{ */ { - zend_bool _old_in_compilation; + bool _old_in_compilation; zend_execute_data *_old_current_execute_data; int _old_http_response_code; char *_old_http_status_line; @@ -1935,7 +1935,7 @@ static void soap_error_handler(int error_num, const char *error_filename, const /* {{{ */ PHP_FUNCTION(use_soap_error_handler) { - zend_bool handler = 1; + bool handler = 1; ZVAL_BOOL(return_value, SOAP_GLOBAL(use_soap_error_handler)); if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &handler) == SUCCESS) { @@ -2188,7 +2188,7 @@ PHP_METHOD(SoapClient, __construct) } /* }}} */ -static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *action, int version, zend_bool one_way, zval *response) /* {{{ */ +static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *action, int version, bool one_way, zval *response) /* {{{ */ { int ret = TRUE; char *buf; @@ -2361,7 +2361,7 @@ static void do_soap_call(zend_execute_data *execute_data, fn = get_function(sdl, function); if (fn != NULL) { sdlBindingPtr binding = fn->binding; - zend_bool one_way = 0; + bool one_way = 0; if (fn->responseName == NULL && fn->responseParameters == NULL && @@ -2501,7 +2501,7 @@ static void verify_soap_headers_array(HashTable *ht) /* {{{ */ /* }}} */ /* {{{ Calls a SOAP function */ -void soap_client_call_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_soap_call) +void soap_client_call_impl(INTERNAL_FUNCTION_PARAMETERS, bool is_soap_call) { char *function, *location=NULL, *soap_action = NULL, *uri = NULL; size_t function_len; @@ -2515,7 +2515,7 @@ void soap_client_call_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_soap_call) zval *param; int arg_count; zval *tmp; - zend_bool free_soap_headers = 0; + bool free_soap_headers = 0; zval *this_ptr; if (is_soap_call) { @@ -2758,7 +2758,7 @@ PHP_METHOD(SoapClient, __doRequest) char *location, *action; size_t location_size, action_size; zend_long version; - zend_bool one_way = 0; + bool one_way = 0; zval *this_ptr = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sssl|b", diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 76e63f04ad..4675615973 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -726,7 +726,7 @@ PHP_FUNCTION(socket_select) PHP_SOCKET max_fd = 0; int retval, sets = 0; zend_long sec, usec = 0; - zend_bool sec_is_null = 0; + bool sec_is_null = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "a!a!a!l!|l", &r_array, &w_array, &e_array, &sec, &sec_is_null, &usec) == FAILURE) { RETURN_THROWS(); @@ -978,7 +978,7 @@ PHP_FUNCTION(socket_write) int retval; size_t str_len; zend_long length = 0; - zend_bool length_is_null = 1; + bool length_is_null = 1; char *str; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|l!", &arg1, socket_ce, &str, &str_len, &length, &length_is_null) == FAILURE) { @@ -1265,7 +1265,7 @@ PHP_FUNCTION(socket_connect) int retval; size_t addr_len; zend_long port; - zend_bool port_is_null = 1; + bool port_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|l!", &resource_socket, socket_ce, &addr, &addr_len, &port, &port_is_null) == FAILURE) { RETURN_THROWS(); @@ -1641,7 +1641,7 @@ PHP_FUNCTION(socket_sendto) int retval; size_t buf_len, addr_len; zend_long len, flags, port; - zend_bool port_is_null = 1; + bool port_is_null = 1; char *buf, *addr; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oslls|l!", &arg1, socket_ce, &buf, &buf_len, &len, &flags, &addr, &addr_len, &port, &port_is_null) == FAILURE) { diff --git a/ext/sodium/sodium_pwhash.c b/ext/sodium/sodium_pwhash.c index e58a9514cc..174d1546de 100644 --- a/ext/sodium/sodium_pwhash.c +++ b/ext/sodium/sodium_pwhash.c @@ -95,14 +95,14 @@ static zend_string *php_sodium_argon2_hash(const zend_string *password, zend_arr return ret; } -static zend_bool php_sodium_argon2_verify(const zend_string *password, const zend_string *hash) { +static bool php_sodium_argon2_verify(const zend_string *password, const zend_string *hash) { if ((ZSTR_LEN(password) >= 0xffffffff) || (ZSTR_LEN(hash) >= 0xffffffff)) { return 0; } return crypto_pwhash_str_verify(ZSTR_VAL(hash), ZSTR_VAL(password), ZSTR_LEN(password)) == 0; } -static zend_bool php_sodium_argon2_needs_rehash(const zend_string *hash, zend_array *options) { +static bool php_sodium_argon2_needs_rehash(const zend_string *hash, zend_array *options) { size_t opslimit, memlimit; if (get_options(options, &memlimit, &opslimit) == FAILURE) { diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index e2ca343b1b..67f87774a0 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -55,7 +55,7 @@ static PHP_GINIT_FUNCTION(spl) } /* }}} */ -static zend_class_entry * spl_find_ce_by_name(zend_string *name, zend_bool autoload) +static zend_class_entry * spl_find_ce_by_name(zend_string *name, bool autoload) { zend_class_entry *ce; @@ -80,7 +80,7 @@ PHP_FUNCTION(class_parents) { zval *obj; zend_class_entry *parent_class, *ce; - zend_bool autoload = 1; + bool autoload = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &obj, &autoload) == FAILURE) { RETURN_THROWS(); @@ -112,7 +112,7 @@ PHP_FUNCTION(class_parents) PHP_FUNCTION(class_implements) { zval *obj; - zend_bool autoload = 1; + bool autoload = 1; zend_class_entry *ce; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &obj, &autoload) == FAILURE) { @@ -140,7 +140,7 @@ PHP_FUNCTION(class_implements) PHP_FUNCTION(class_uses) { zval *obj; - zend_bool autoload = 1; + bool autoload = 1; zend_class_entry *ce; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &obj, &autoload) == FAILURE) { @@ -404,7 +404,7 @@ static autoload_func_info *autoload_func_info_from_fci( return alfi; } -static zend_bool autoload_func_info_equals( +static bool autoload_func_info_equals( const autoload_func_info *alfi1, const autoload_func_info *alfi2) { return alfi1->func_ptr == alfi2->func_ptr && alfi1->obj == alfi2->obj @@ -492,8 +492,8 @@ static Bucket *spl_find_registered_function(autoload_func_info *find_alfi) { /* {{{ Register given function as autoloader */ PHP_FUNCTION(spl_autoload_register) { - zend_bool do_throw = 1; - zend_bool prepend = 0; + bool do_throw = 1; + bool prepend = 0; zend_fcall_info fci = {0}; zend_fcall_info_cache fcc; autoload_func_info *alfi; diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 176e507a49..dc66241e44 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -111,7 +111,7 @@ static inline HashTable *spl_array_get_hash_table(spl_array_object* intern) { /* } /* }}} */ -static inline zend_bool spl_array_is_object(spl_array_object *intern) /* {{{ */ +static inline bool spl_array_is_object(spl_array_object *intern) /* {{{ */ { while (intern->ar_flags & SPL_ARRAY_USE_OTHER) { intern = Z_SPLARRAY_P(&intern->array); @@ -659,7 +659,7 @@ num_index: } { - zend_bool result = check_empty ? zend_is_true(value) : Z_TYPE_P(value) != IS_NULL; + bool result = check_empty ? zend_is_true(value) : Z_TYPE_P(value) != IS_NULL; if (value == &rv) { zval_ptr_dtor(&rv); } @@ -755,7 +755,7 @@ static HashTable *spl_array_get_properties_for(zend_object *object, zend_prop_pu { spl_array_object *intern = spl_array_from_obj(object); HashTable *ht; - zend_bool dup; + bool dup; if (intern->ar_flags & SPL_ARRAY_STD_PROP_LIST) { return zend_std_get_properties_for(object, purpose); diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 7d9ea9cc2b..1ba7aa11c5 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -478,7 +478,7 @@ static spl_filesystem_object *spl_filesystem_object_create_info(spl_filesystem_o static spl_filesystem_object *spl_filesystem_object_create_type(int num_args, spl_filesystem_object *source, int type, zend_class_entry *ce, zval *return_value) /* {{{ */ { spl_filesystem_object *intern; - zend_bool use_include_path = 0; + bool use_include_path = 0; zval arg1, arg2; zend_error_handling error_handling; @@ -1467,7 +1467,7 @@ PHP_METHOD(FilesystemIterator, setFlags) /* {{{ Returns whether current entry is a directory and not '.' or '..' */ PHP_METHOD(RecursiveDirectoryIterator, hasChildren) { - zend_bool allow_links = 0; + bool allow_links = 0; spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &allow_links) == FAILURE) { @@ -2051,7 +2051,7 @@ static void spl_filesystem_file_rewind(zval * this_ptr, spl_filesystem_object *i PHP_METHOD(SplFileObject, __construct) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); - zend_bool use_include_path = 0; + bool use_include_path = 0; char *p1, *p2; char *tmp_path; size_t tmp_path_len; diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index cc8723f05e..bc311589b6 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -764,7 +764,7 @@ PHP_METHOD(SplDoublyLinkedList, offsetGet) PHP_METHOD(SplDoublyLinkedList, offsetSet) { zend_long index; - zend_bool index_is_null = 1; + bool index_is_null = 1; zval *value; spl_dllist_object *intern; diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index 4c7ff5dd35..ea5e6ee984 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -470,7 +470,7 @@ static int spl_fixedarray_object_has_dimension(zend_object *object, zval *offset if (UNEXPECTED(intern->methods && intern->methods->fptr_offset_has)) { zval rv; - zend_bool result; + bool result; zend_call_method_with_1_params(object, intern->std.ce, &intern->methods->fptr_offset_has, "offsetExists", &rv, offset); result = zend_is_true(&rv); @@ -593,7 +593,7 @@ PHP_METHOD(SplFixedArray, fromArray) spl_fixedarray array; spl_fixedarray_object *intern; int num; - zend_bool save_indexes = 1; + bool save_indexes = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "a|b", &data, &save_indexes) == FAILURE) { RETURN_THROWS(); diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index 40538cda8e..a4531f6056 100644 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -93,7 +93,7 @@ typedef struct _spl_recursive_it_object { RecursiveIteratorMode mode; int flags; int max_depth; - zend_bool in_iteration; + bool in_iteration; zend_function *beginIteration; zend_function *endIteration; zend_function *callHasChildren; @@ -685,7 +685,7 @@ PHP_METHOD(RecursiveIteratorIterator, getSubIterator) { spl_recursive_it_object *object = Z_SPLRECURSIVE_IT_P(ZEND_THIS); zend_long level; - zend_bool level_is_null = 1; + bool level_is_null = 1; zval *value; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &level, &level_is_null) == FAILURE) { @@ -3135,7 +3135,7 @@ static int spl_iterator_to_values_apply(zend_object_iterator *iter, void *puser) PHP_FUNCTION(iterator_to_array) { zval *obj; - zend_bool use_keys = 1; + bool use_keys = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|b", &obj, zend_ce_traversable, &use_keys) == FAILURE) { RETURN_THROWS(); diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index ee8abb52d7..3fd50ceb89 100644 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -933,7 +933,7 @@ PHP_METHOD(MultipleIterator, attachIterator) zval zinfo; zend_string *info_str; zend_long info_long; - zend_bool info_is_null = 1; + bool info_is_null = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJ_OF_CLASS(iterator, zend_ce_iterator) diff --git a/ext/sqlite3/php_sqlite3_structs.h b/ext/sqlite3/php_sqlite3_structs.h index 80e915da68..07b0c8ba95 100644 --- a/ext/sqlite3/php_sqlite3_structs.h +++ b/ext/sqlite3/php_sqlite3_structs.h @@ -74,7 +74,7 @@ typedef struct _php_sqlite3_db_object { zend_fcall_info authorizer_fci; zend_fcall_info_cache authorizer_fcc; - zend_bool exception; + bool exception; zend_llist free_list; zend_object zo; diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index cd91e68fd3..cfd0cb7eae 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -306,7 +306,7 @@ PHP_METHOD(SQLite3, enableExtendedResultCodes) { php_sqlite3_db_object *db_obj; zval *object = ZEND_THIS; - zend_bool enable = 1; + bool enable = 1; db_obj = Z_SQLITE3_DB_P(object); int ret; @@ -660,7 +660,7 @@ PHP_METHOD(SQLite3, querySingle) zend_string *sql; char *errtext = NULL; int return_code; - zend_bool entire_row = 0; + bool entire_row = 0; sqlite3_stmt *stmt; db_obj = Z_SQLITE3_DB_P(object); @@ -1281,7 +1281,7 @@ PHP_METHOD(SQLite3, enableExceptions) { php_sqlite3_db_object *db_obj; zval *object = ZEND_THIS; - zend_bool enableExceptions = 0; + bool enableExceptions = 0; db_obj = Z_SQLITE3_DB_P(object); @@ -1607,7 +1607,7 @@ static int php_sqlite3_bind_params(php_sqlite3_stmt *stmt_obj) /* {{{ */ PHP_METHOD(SQLite3Stmt, getSQL) { php_sqlite3_stmt *stmt_obj; - zend_bool expanded = 0; + bool expanded = 0; zval *object = getThis(); stmt_obj = Z_SQLITE3_STMT_P(object); int bind_rc; diff --git a/ext/standard/array.c b/ext/standard/array.c index e4707031b7..e0b52ca169 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -849,7 +849,7 @@ static inline int php_array_user_compare_unstable(Bucket *f, Bucket *s) /* {{{ * { zval args[2]; zval retval; - zend_bool call_failed; + bool call_failed; ZVAL_COPY(&args[0], &f->val); ZVAL_COPY(&args[1], &s->val); @@ -915,7 +915,7 @@ static int php_array_user_compare(Bucket *a, Bucket *b) /* {{{ */ BG(user_compare_fci) = old_user_compare_fci; \ BG(user_compare_fci_cache) = old_user_compare_fci_cache; \ -static void php_usort(INTERNAL_FUNCTION_PARAMETERS, bucket_compare_func_t compare_func, zend_bool renumber) /* {{{ */ +static void php_usort(INTERNAL_FUNCTION_PARAMETERS, bucket_compare_func_t compare_func, bool renumber) /* {{{ */ { zval *array; zend_array *arr; @@ -965,7 +965,7 @@ static inline int php_array_user_key_compare_unstable(Bucket *f, Bucket *s) /* { { zval args[2]; zval retval; - zend_bool call_failed; + bool call_failed; if (f->key == NULL) { ZVAL_LONG(&args[0], f->h); @@ -1459,7 +1459,7 @@ static inline void php_search_array(INTERNAL_FUNCTION_PARAMETERS, int behavior) *entry; /* pointer to array entry */ zend_ulong num_idx; zend_string *str_idx; - zend_bool strict = 0; /* strict comparison or not */ + bool strict = 0; /* strict comparison or not */ ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ZVAL(value) @@ -1621,7 +1621,7 @@ static zend_always_inline int php_valid_var_name(const char *var_name, size_t va } /* }}} */ -PHPAPI int php_prefix_varname(zval *result, zend_string *prefix, const char *var_name, size_t var_name_len, zend_bool add_underscore) /* {{{ */ +PHPAPI int php_prefix_varname(zval *result, zend_string *prefix, const char *var_name, size_t var_name_len, bool add_underscore) /* {{{ */ { ZVAL_NEW_STR(result, zend_string_alloc(ZSTR_LEN(prefix) + (add_underscore ? 1 : 0) + var_name_len, 0)); memcpy(Z_STRVAL_P(result), ZSTR_VAL(prefix), ZSTR_LEN(prefix)); @@ -3284,7 +3284,7 @@ PHP_FUNCTION(array_splice) HashTable *rem_hash = NULL; zend_long offset, length = 0; - zend_bool length_is_null = 1; + bool length_is_null = 1; int num_in; /* Number of elements in the input array */ ZEND_PARSE_PARAMETERS_START(2, 4) @@ -3372,8 +3372,8 @@ PHP_FUNCTION(array_slice) zval *entry; /* An array entry */ zend_long offset; /* Offset to get elements from */ zend_long length = 0; /* How many elements to get */ - zend_bool length_is_null = 1; /* Whether an explicit length has been omitted */ - zend_bool preserve_keys = 0; /* Whether to preserve keys while copying to the new array */ + bool length_is_null = 1; /* Whether an explicit length has been omitted */ + bool preserve_keys = 0; /* Whether to preserve keys while copying to the new array */ uint32_t num_in; /* Number of elements in the input array */ zend_string *string_key; zend_ulong num_key; @@ -3727,7 +3727,7 @@ static zend_always_inline void php_array_merge_wrapper(INTERNAL_FUNCTION_PARAMET return; } } else { - zend_bool copy = 1; + bool copy = 1; zend_string *string_key; ZEND_HASH_FOREACH_STR_KEY(Z_ARRVAL_P(ret), string_key) { @@ -3826,7 +3826,7 @@ PHP_FUNCTION(array_keys) *search_value = NULL, /* Value to search for */ *entry, /* An entry in the input array */ new_val; /* New value */ - zend_bool strict = 0; /* do strict comparison */ + bool strict = 0; /* do strict comparison */ zend_ulong num_idx; zend_string *str_idx; zend_array *arrval; @@ -4069,10 +4069,10 @@ PHP_FUNCTION(array_column) zval *colval, *data, rv; zend_string *column_str = NULL; zend_long column_long; - zend_bool column_is_null = 0; + bool column_is_null = 0; zend_string *index_str = NULL; zend_long index_long; - zend_bool index_is_null = 1; + bool index_is_null = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_ARRAY_HT(input) @@ -4129,7 +4129,7 @@ PHP_FUNCTION(array_reverse) *entry; /* An entry in the input array */ zend_string *string_key; zend_ulong num_key; - zend_bool preserve_keys = 0; /* whether to preserve keys */ + bool preserve_keys = 0; /* whether to preserve keys */ ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ARRAY(input) @@ -4475,7 +4475,7 @@ static void php_array_intersect_key(INTERNAL_FUNCTION_PARAMETERS, int data_compa int argc, i; zval *args; int (*intersect_data_compare_func)(zval *, zval *) = NULL; - zend_bool ok; + bool ok; zval *val, *data; char *param_spec; zend_string *key; @@ -4854,7 +4854,7 @@ static void php_array_diff_key(INTERNAL_FUNCTION_PARAMETERS, int data_compare_ty int argc, i; zval *args; int (*diff_data_compare_func)(zval *, zval *) = NULL; - zend_bool ok; + bool ok; zval *val, *data; zend_string *key; zend_ulong h; @@ -5789,7 +5789,7 @@ PHP_FUNCTION(array_filter) zval *key; zval args[2]; zval retval; - zend_bool have_callback = 0; + bool have_callback = 0; zend_long use_type = 0; zend_string *string_key; zend_fcall_info fci = empty_fcall_info; @@ -6069,7 +6069,7 @@ PHP_FUNCTION(array_chunk) zend_long size, current = 0; zend_string *str_key; zend_ulong num_key; - zend_bool preserve_keys = 0; + bool preserve_keys = 0; zval *input = NULL; zval chunk; zval *entry; diff --git a/ext/standard/assert.c b/ext/standard/assert.c index 86acaec389..fae6d940ba 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -24,10 +24,10 @@ ZEND_BEGIN_MODULE_GLOBALS(assert) zval callback; char *cb; - zend_bool active; - zend_bool bail; - zend_bool warning; - zend_bool exception; + bool active; + bool bail; + bool warning; + bool exception; ZEND_END_MODULE_GLOBALS(assert) ZEND_DECLARE_MODULE_GLOBALS(assert) @@ -208,7 +208,7 @@ PHP_FUNCTION(assert_options) { zval *value = NULL; zend_long what; - zend_bool oldint; + bool oldint; int ac = ZEND_NUM_ARGS(); zend_string *key; diff --git a/ext/standard/base64.c b/ext/standard/base64.c index 2d67f88f66..234d61226f 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -243,7 +243,7 @@ static zend_always_inline size_t neon_base64_decode(const unsigned char *in, siz } #endif /* __aarch64__ */ -static zend_always_inline int php_base64_decode_impl(const unsigned char *in, size_t inl, unsigned char *out, size_t *outl, zend_bool strict) /* {{{ */ +static zend_always_inline int php_base64_decode_impl(const unsigned char *in, size_t inl, unsigned char *out, size_t *outl, bool strict) /* {{{ */ { int ch; size_t i = 0, padding = 0, j = *outl; @@ -368,23 +368,23 @@ fail: # if ZEND_INTRIN_AVX2_RESOLVER ZEND_INTRIN_AVX2_FUNC_DECL(zend_string *php_base64_encode_avx2(const unsigned char *str, size_t length)); -ZEND_INTRIN_AVX2_FUNC_DECL(zend_string *php_base64_decode_ex_avx2(const unsigned char *str, size_t length, zend_bool strict)); +ZEND_INTRIN_AVX2_FUNC_DECL(zend_string *php_base64_decode_ex_avx2(const unsigned char *str, size_t length, bool strict)); # endif # if ZEND_INTRIN_SSSE3_RESOLVER ZEND_INTRIN_SSSE3_FUNC_DECL(zend_string *php_base64_encode_ssse3(const unsigned char *str, size_t length)); -ZEND_INTRIN_SSSE3_FUNC_DECL(zend_string *php_base64_decode_ex_ssse3(const unsigned char *str, size_t length, zend_bool strict)); +ZEND_INTRIN_SSSE3_FUNC_DECL(zend_string *php_base64_decode_ex_ssse3(const unsigned char *str, size_t length, bool strict)); # endif zend_string *php_base64_encode_default(const unsigned char *str, size_t length); -zend_string *php_base64_decode_ex_default(const unsigned char *str, size_t length, zend_bool strict); +zend_string *php_base64_decode_ex_default(const unsigned char *str, size_t length, bool strict); # if (ZEND_INTRIN_AVX2_FUNC_PROTO || ZEND_INTRIN_SSSE3_FUNC_PROTO) PHPAPI zend_string *php_base64_encode(const unsigned char *str, size_t length) __attribute__((ifunc("resolve_base64_encode"))); -PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, zend_bool strict) __attribute__((ifunc("resolve_base64_decode"))); +PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, bool strict) __attribute__((ifunc("resolve_base64_decode"))); typedef zend_string *(*base64_encode_func_t)(const unsigned char *, size_t); -typedef zend_string *(*base64_decode_func_t)(const unsigned char *, size_t, zend_bool); +typedef zend_string *(*base64_decode_func_t)(const unsigned char *, size_t, bool); ZEND_NO_SANITIZE_ADDRESS ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */ @@ -420,12 +420,12 @@ static base64_decode_func_t resolve_base64_decode() { # else /* (ZEND_INTRIN_AVX2_FUNC_PROTO || ZEND_INTRIN_SSSE3_FUNC_PROTO) */ PHPAPI zend_string *(*php_base64_encode_ptr)(const unsigned char *str, size_t length) = NULL; -PHPAPI zend_string *(*php_base64_decode_ex_ptr)(const unsigned char *str, size_t length, zend_bool strict) = NULL; +PHPAPI zend_string *(*php_base64_decode_ex_ptr)(const unsigned char *str, size_t length, bool strict) = NULL; PHPAPI zend_string *php_base64_encode(const unsigned char *str, size_t length) { return php_base64_encode_ptr(str, length); } -PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, zend_bool strict) { +PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, bool strict) { return php_base64_decode_ex_ptr(str, length, strict); } @@ -775,11 +775,11 @@ static __m128i php_base64_decode_ssse3_reshuffle(__m128i in) #if ZEND_INTRIN_AVX2_NATIVE || ZEND_INTRIN_AVX2_RESOLVER || ZEND_INTRIN_SSSE3_NATIVE || ZEND_INTRIN_SSSE3_RESOLVER # if ZEND_INTRIN_AVX2_NATIVE || ZEND_INTRIN_SSSE3_NATIVE -PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, zend_bool strict) +PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, bool strict) # elif ZEND_INTRIN_AVX2_RESOLVER -zend_string *php_base64_decode_ex_avx2(const unsigned char *str, size_t length, zend_bool strict) +zend_string *php_base64_decode_ex_avx2(const unsigned char *str, size_t length, bool strict) # else -zend_string *php_base64_decode_ex_ssse3(const unsigned char *str, size_t length, zend_bool strict) +zend_string *php_base64_decode_ex_ssse3(const unsigned char *str, size_t length, bool strict) # endif { const unsigned char *c = str; @@ -856,7 +856,7 @@ zend_string *php_base64_decode_ex_ssse3(const unsigned char *str, size_t length, } # if ZEND_INTRIN_SSSE3_RESOLVER && ZEND_INTRIN_AVX2_RESOLVER -zend_string *php_base64_decode_ex_ssse3(const unsigned char *str, size_t length, zend_bool strict) +zend_string *php_base64_decode_ex_ssse3(const unsigned char *str, size_t length, bool strict) { const unsigned char *c = str; unsigned char *o; @@ -903,9 +903,9 @@ PHPAPI zend_string *php_base64_encode(const unsigned char *str, size_t length) #if !ZEND_INTRIN_AVX2_NATIVE && !ZEND_INTRIN_SSSE3_NATIVE #if ZEND_INTRIN_AVX2_RESOLVER || ZEND_INTRIN_SSSE3_RESOLVER -zend_string *php_base64_decode_ex_default(const unsigned char *str, size_t length, zend_bool strict) +zend_string *php_base64_decode_ex_default(const unsigned char *str, size_t length, bool strict) #else -PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, zend_bool strict) +PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, bool strict) #endif { zend_string *result; @@ -945,7 +945,7 @@ PHP_FUNCTION(base64_encode) PHP_FUNCTION(base64_decode) { char *str; - zend_bool strict = 0; + bool strict = 0; size_t str_len; zend_string *result; diff --git a/ext/standard/base64.h b/ext/standard/base64.h index 170c0b0c61..a6ce0e22c6 100644 --- a/ext/standard/base64.h +++ b/ext/standard/base64.h @@ -62,7 +62,7 @@ PHP_MINIT_FUNCTION(base64_intrin); #endif PHPAPI extern zend_string *php_base64_encode(const unsigned char *, size_t); -PHPAPI extern zend_string *php_base64_decode_ex(const unsigned char *, size_t, zend_bool); +PHPAPI extern zend_string *php_base64_decode_ex(const unsigned char *, size_t, bool); static inline zend_string *php_base64_encode_str(const zend_string *str) { return php_base64_encode((const unsigned char*)(ZSTR_VAL(str)), ZSTR_LEN(str)); diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 0d4ef2dad8..54c3188771 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -790,7 +790,7 @@ PHP_FUNCTION(getenv) { char *str = NULL; size_t str_len; - zend_bool local_only = 0; + bool local_only = 0; ZEND_PARSE_PARAMETERS_START(0, 2) Z_PARAM_OPTIONAL @@ -1807,7 +1807,7 @@ PHP_FUNCTION(register_shutdown_function) } /* }}} */ -PHPAPI zend_bool register_user_shutdown_function(const char *function_name, size_t function_len, php_shutdown_function_entry *shutdown_function_entry) /* {{{ */ +PHPAPI bool register_user_shutdown_function(const char *function_name, size_t function_len, php_shutdown_function_entry *shutdown_function_entry) /* {{{ */ { if (!BG(user_shutdown_function_names)) { ALLOC_HASHTABLE(BG(user_shutdown_function_names)); @@ -1819,7 +1819,7 @@ PHPAPI zend_bool register_user_shutdown_function(const char *function_name, size } /* }}} */ -PHPAPI zend_bool remove_user_shutdown_function(const char *function_name, size_t function_len) /* {{{ */ +PHPAPI bool remove_user_shutdown_function(const char *function_name, size_t function_len) /* {{{ */ { if (BG(user_shutdown_function_names)) { return zend_hash_str_del(BG(user_shutdown_function_names), function_name, function_len) != FAILURE; @@ -1829,7 +1829,7 @@ PHPAPI zend_bool remove_user_shutdown_function(const char *function_name, size_t } /* }}} */ -PHPAPI zend_bool append_user_shutdown_function(php_shutdown_function_entry *shutdown_function_entry) /* {{{ */ +PHPAPI bool append_user_shutdown_function(php_shutdown_function_entry *shutdown_function_entry) /* {{{ */ { if (!BG(user_shutdown_function_names)) { ALLOC_HASHTABLE(BG(user_shutdown_function_names)); @@ -1857,7 +1857,7 @@ PHP_FUNCTION(highlight_file) size_t filename_len; int ret; zend_syntax_highlighter_ini syntax_highlighter_ini; - zend_bool i = 0; + bool i = 0; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_PATH(filename, filename_len) @@ -1932,7 +1932,7 @@ PHP_FUNCTION(highlight_string) zend_string *str; zend_syntax_highlighter_ini syntax_highlighter_ini; char *hicompiled_string_description; - zend_bool i = 0; + bool i = 0; int old_error_reporting = EG(error_reporting); ZEND_PARSE_PARAMETERS_START(1, 2) @@ -2007,7 +2007,7 @@ PHP_FUNCTION(ini_get_all) char *extname = NULL; size_t extname_len = 0, module_number = 0; zend_module_entry *module; - zend_bool details = 1; + bool details = 1; zend_string *key; zend_ini_entry *ini_entry; @@ -2191,7 +2191,7 @@ PHP_FUNCTION(get_include_path) PHP_FUNCTION(print_r) { zval *var; - zend_bool do_return = 0; + bool do_return = 0; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(var) @@ -2229,8 +2229,8 @@ PHP_FUNCTION(connection_status) /* {{{ Set whether we want to ignore a user abort event or not */ PHP_FUNCTION(ignore_user_abort) { - zend_bool arg = 0; - zend_bool arg_is_null = 1; + bool arg = 0; + bool arg_is_null = 1; int old_setting; ZEND_PARSE_PARAMETERS_START(0, 1) @@ -2464,7 +2464,7 @@ PHP_FUNCTION(move_uploaded_file) { char *path, *new_path; size_t path_len, new_path_len; - zend_bool successful = 0; + bool successful = 0; #ifndef PHP_WIN32 int oldmask; int ret; @@ -2595,7 +2595,7 @@ PHP_FUNCTION(parse_ini_file) { char *filename = NULL; size_t filename_len = 0; - zend_bool process_sections = 0; + bool process_sections = 0; zend_long scanner_mode = ZEND_INI_SCANNER_NORMAL; zend_file_handle fh; zend_ini_parser_cb_t ini_parser_cb; @@ -2636,7 +2636,7 @@ PHP_FUNCTION(parse_ini_string) { char *string = NULL, *str = NULL; size_t str_len = 0; - zend_bool process_sections = 0; + bool process_sections = 0; zend_long scanner_mode = ZEND_INI_SCANNER_NORMAL; zend_ini_parser_cb_t ini_parser_cb; diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index 6c745dc549..5971ffd2ab 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -49,7 +49,7 @@ PHP_RSHUTDOWN_FUNCTION(browscap); /* Left for BC (not binary safe!) */ PHPAPI int _php_error_log(int opt_err, const char *message, const char *opt, const char *headers); PHPAPI int _php_error_log_ex(int opt_err, const char *message, size_t message_len, const char *opt, const char *headers); -PHPAPI int php_prefix_varname(zval *result, zend_string *prefix, const char *var_name, size_t var_name_len, zend_bool add_underscore); +PHPAPI int php_prefix_varname(zval *result, zend_string *prefix, const char *var_name, size_t var_name_len, bool add_underscore); #define MT_N (624) @@ -62,7 +62,7 @@ typedef struct _php_basic_globals { HashTable putenv_ht; zend_string *strtok_string; zend_string *ctype_string; /* current LC_CTYPE locale (or NULL for 'C') */ - zend_bool locale_changed; /* locale was changed and has to be restored */ + bool locale_changed; /* locale was changed and has to be restored */ char *strtok_last; char strtok_table[256]; size_t strtok_len; @@ -87,7 +87,7 @@ typedef struct _php_basic_globals { uint32_t *next; /* next random value is computed from here */ int left; /* can *next++ this many times before reloading */ - zend_bool mt_rand_is_seeded; /* Whether mt_rand() has been seeded */ + bool mt_rand_is_seeded; /* Whether mt_rand() has been seeded */ zend_long mt_rand_mode; /* syslog.c */ @@ -148,9 +148,9 @@ typedef struct _php_shutdown_function_entry { int arg_count; } php_shutdown_function_entry; -PHPAPI extern zend_bool register_user_shutdown_function(const char *function_name, size_t function_len, php_shutdown_function_entry *shutdown_function_entry); -PHPAPI extern zend_bool remove_user_shutdown_function(const char *function_name, size_t function_len); -PHPAPI extern zend_bool append_user_shutdown_function(php_shutdown_function_entry *shutdown_function_entry); +PHPAPI extern bool register_user_shutdown_function(const char *function_name, size_t function_len, php_shutdown_function_entry *shutdown_function_entry); +PHPAPI extern bool remove_user_shutdown_function(const char *function_name, size_t function_len); +PHPAPI extern bool append_user_shutdown_function(php_shutdown_function_entry *shutdown_function_entry); PHPAPI void php_call_shutdown_functions(void); PHPAPI void php_free_shutdown_functions(void); diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index 4c8f331609..e5a565798b 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -85,7 +85,7 @@ static void browscap_entry_dtor_persistent(zval *zvalue) pefree(entry, 1); } -static inline zend_bool is_placeholder(char c) { +static inline bool is_placeholder(char c) { return c == '?' || c == '*'; } @@ -221,7 +221,7 @@ typedef struct _browscap_parser_ctx { } browscap_parser_ctx; static zend_string *browscap_intern_str( - browscap_parser_ctx *ctx, zend_string *str, zend_bool persistent) { + browscap_parser_ctx *ctx, zend_string *str, bool persistent) { zend_string *interned = zend_hash_find_ptr(&ctx->str_interned, str); if (interned) { zend_string_addref(interned); @@ -237,7 +237,7 @@ static zend_string *browscap_intern_str( } static zend_string *browscap_intern_str_ci( - browscap_parser_ctx *ctx, zend_string *str, zend_bool persistent) { + browscap_parser_ctx *ctx, zend_string *str, bool persistent) { zend_string *lcname; zend_string *interned; ALLOCA_FLAG(use_heap); @@ -261,7 +261,7 @@ static zend_string *browscap_intern_str_ci( } static void browscap_add_kv( - browser_data *bdata, zend_string *key, zend_string *value, zend_bool persistent) { + browser_data *bdata, zend_string *key, zend_string *value, bool persistent) { if (bdata->kv_used == bdata->kv_size) { bdata->kv_size *= 2; bdata->kv = safe_perealloc(bdata->kv, sizeof(browscap_kv), bdata->kv_size, 0, persistent); @@ -679,7 +679,7 @@ static void browscap_zval_copy_ctor(zval *p) /* {{{ */ PHP_FUNCTION(get_browser) { zend_string *agent_name = NULL, *lookup_browser_name; - zend_bool return_array = 0; + bool return_array = 0; browser_data *bdata; browscap_entry *found_entry = NULL; HashTable *agent_ht; diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index 8c105cf910..b3055bacd4 100644 --- a/ext/standard/crypt.c +++ b/ext/standard/crypt.c @@ -79,7 +79,7 @@ PHP_MSHUTDOWN_FUNCTION(crypt) /* {{{ */ } /* }}} */ -PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, zend_bool quiet) +PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, bool quiet) { char *crypt_res; zend_string *result; diff --git a/ext/standard/crypt_sha256.c b/ext/standard/crypt_sha256.c index f64cf00868..4ba4f6c3dd 100644 --- a/ext/standard/crypt_sha256.c +++ b/ext/standard/crypt_sha256.c @@ -344,7 +344,7 @@ char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int b char *s_bytes; /* Default number of rounds. */ size_t rounds = ROUNDS_DEFAULT; - zend_bool rounds_custom = 0; + bool rounds_custom = 0; /* Find beginning of salt string. The prefix should normally always be present. Just in case it is not. */ diff --git a/ext/standard/crypt_sha512.c b/ext/standard/crypt_sha512.c index 94dc772fd9..f896dad5a8 100644 --- a/ext/standard/crypt_sha512.c +++ b/ext/standard/crypt_sha512.c @@ -377,7 +377,7 @@ php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen) char *s_bytes; /* Default number of rounds. */ size_t rounds = ROUNDS_DEFAULT; - zend_bool rounds_custom = 0; + bool rounds_custom = 0; /* Find beginning of salt string. The prefix should normally always be present. Just in case it is not. */ diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 6807c534ba..e2b6f5bb3d 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -408,7 +408,7 @@ PHP_FUNCTION(glob) glob_t globbuf; size_t n; int ret; - zend_bool basedir_limit = 0; + bool basedir_limit = 0; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_PATH(pattern, pattern_len) diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 41b98424ed..105e0f0f26 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -811,7 +811,7 @@ PHP_FUNCTION(dns_get_record) u_char *cp = NULL, *end = NULL; int n, qd, an, ns = 0, ar = 0; int type, first_query = 1, store_results = 1; - zend_bool raw = 0; + bool raw = 0; ZEND_PARSE_PARAMETERS_START(1, 5) Z_PARAM_STRING(hostname, hostname_len) diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c index afeab23a08..afd6b7eab6 100644 --- a/ext/standard/dns_win32.c +++ b/ext/standard/dns_win32.c @@ -351,7 +351,7 @@ PHP_FUNCTION(dns_get_record) zend_long type_param = PHP_DNS_ANY; zval *authns = NULL, *addtl = NULL; int type, type_to_fetch, first_query = 1, store_results = 1; - zend_bool raw = 0; + bool raw = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|lz!z!b", &hostname, &hostname_len, &type_param, &authns, &addtl, &raw) == FAILURE) { diff --git a/ext/standard/file.c b/ext/standard/file.c index 6335b5a9af..60d0f84255 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -379,7 +379,7 @@ PHP_FUNCTION(get_meta_tags) { char *filename; size_t filename_len; - zend_bool use_include_path = 0; + bool use_include_path = 0; int in_tag = 0, done = 0; int looking_for_val = 0, have_name = 0, have_content = 0; int saw_name = 0, saw_content = 0; @@ -523,11 +523,11 @@ PHP_FUNCTION(file_get_contents) { char *filename; size_t filename_len; - zend_bool use_include_path = 0; + bool use_include_path = 0; php_stream *stream; zend_long offset = 0; zend_long maxlen; - zend_bool maxlen_is_null = 1; + bool maxlen_is_null = 1; zval *zcontext = NULL; php_stream_context *context = NULL; zend_string *contents; @@ -728,9 +728,9 @@ PHP_FUNCTION(file) register int i = 0; char eol_marker = '\n'; zend_long flags = 0; - zend_bool use_include_path; - zend_bool include_new_line; - zend_bool skip_blank_lines; + bool use_include_path; + bool include_new_line; + bool skip_blank_lines; php_stream *stream; zval *zcontext = NULL; php_stream_context *context = NULL; @@ -869,7 +869,7 @@ PHP_FUNCTION(fopen) { char *filename, *mode; size_t filename_len, mode_len; - zend_bool use_include_path = 0; + bool use_include_path = 0; zval *zcontext = NULL; php_stream *stream; php_stream_context *context = NULL; @@ -1018,7 +1018,7 @@ PHPAPI PHP_FUNCTION(fgets) { zval *res; zend_long len = 1024; - zend_bool len_is_null = 1; + bool len_is_null = 1; char *buf = NULL; size_t line_len = 0; zend_string *str; @@ -1141,7 +1141,7 @@ PHPAPI PHP_FUNCTION(fwrite) ssize_t ret; size_t num_bytes; zend_long maxlen = 0; - zend_bool maxlen_is_null = 1; + bool maxlen_is_null = 1; php_stream *stream; ZEND_PARSE_PARAMETERS_START(2, 3) @@ -1286,7 +1286,7 @@ PHP_FUNCTION(mkdir) size_t dir_len; zval *zcontext = NULL; zend_long mode = 0777; - zend_bool recursive = 0; + bool recursive = 0; php_stream_context *context; ZEND_PARSE_PARAMETERS_START(1, 4) @@ -1329,7 +1329,7 @@ PHP_FUNCTION(readfile) char *filename; size_t filename_len; size_t size = 0; - zend_bool use_include_path = 0; + bool use_include_path = 0; zval *zcontext = NULL; php_stream *stream; php_stream_context *context = NULL; @@ -1358,7 +1358,7 @@ PHP_FUNCTION(readfile) PHP_FUNCTION(umask) { zend_long mask = 0; - zend_bool mask_is_null = 1; + bool mask_is_null = 1; int oldumask; ZEND_PARSE_PARAMETERS_START(0, 1) @@ -1931,7 +1931,7 @@ PHP_FUNCTION(fgetcsv) { zval *fd; - zend_bool len_is_null = 1; + bool len_is_null = 1; char *delimiter_str = NULL; size_t delimiter_str_len = 0; char *enclosure_str = NULL; @@ -2013,7 +2013,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, int char *temp, *tptr, *bptr, *line_end, *limit; size_t temp_len, line_end_len; int inc_len; - zend_bool first_field = 1; + bool first_field = 1; ZEND_ASSERT((escape_char >= 0 && escape_char <= UCHAR_MAX) || escape_char == PHP_CSV_NO_ESCAPE); diff --git a/ext/standard/file.h b/ext/standard/file.h index c51a953086..f9d153a52a 100644 --- a/ext/standard/file.h +++ b/ext/standard/file.h @@ -86,7 +86,7 @@ php_meta_tags_token php_next_meta_token(php_meta_tags_data *); typedef struct { int pclose_ret; size_t def_chunk_size; - zend_bool auto_detect_line_endings; + bool auto_detect_line_endings; zend_long default_socket_timeout; char *user_agent; /* for the http wrapper */ char *from_address; /* for the ftp and http wrappers */ diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 303e919c19..0f39116676 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -594,7 +594,7 @@ PHP_FUNCTION(touch) char *filename; size_t filename_len; zend_long filetime = 0, fileatime = 0; - zend_bool filetime_is_null = 1, fileatime_is_null = 1; + bool filetime_is_null = 1, fileatime_is_null = 1; int ret; FILE *file; struct utimbuf newtimebuf; @@ -674,7 +674,7 @@ PHP_FUNCTION(touch) #endif /* {{{ php_clear_stat_cache() */ -PHPAPI void php_clear_stat_cache(zend_bool clear_realpath_cache, const char *filename, size_t filename_len) +PHPAPI void php_clear_stat_cache(bool clear_realpath_cache, const char *filename, size_t filename_len) { /* always clear CurrentStatFile and CurrentLStatFile even if filename is not NULL * as it may contain outdated data (e.g. "nlink" for a directory when deleting a file @@ -700,7 +700,7 @@ PHPAPI void php_clear_stat_cache(zend_bool clear_realpath_cache, const char *fil /* {{{ Clear file stat cache */ PHP_FUNCTION(clearstatcache) { - zend_bool clear_realpath_cache = 0; + bool clear_realpath_cache = 0; char *filename = NULL; size_t filename_len = 0; diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c index a9c3cb0bf5..a4c5d6fe66 100644 --- a/ext/standard/fsock.c +++ b/ext/standard/fsock.c @@ -32,7 +32,7 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent) zend_long port = -1; zval *zerrno = NULL, *zerrstr = NULL; double timeout; - zend_bool timeout_is_null = 1; + bool timeout_is_null = 1; #ifndef PHP_WIN32 time_t conv; #else diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index 4dd38c4cba..896473b2d4 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -415,7 +415,7 @@ php_stream * php_stream_url_wrap_ftp(php_stream_wrapper *wrapper, const char *pa php_stream *reuseid=NULL; size_t file_size = 0; zval *tmpzval; - zend_bool allow_overwrite = 0; + bool allow_overwrite = 0; int8_t read_write = 0; char *transport; int transport_len; diff --git a/ext/standard/head.c b/ext/standard/head.c index 36f64fcb4d..19ed36c52c 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -31,7 +31,7 @@ /* {{{ Sends a raw HTTP header */ PHP_FUNCTION(header) { - zend_bool rep = 1; + bool rep = 1; sapi_header_line ctr = {0}; char *line; size_t len; @@ -193,7 +193,7 @@ PHPAPI zend_result php_setcookie(zend_string *name, zend_string *value, time_t e } static zend_result php_head_parse_cookie_options_array(HashTable *options, zend_long *expires, zend_string **path, - zend_string **domain, zend_bool *secure, zend_bool *httponly, zend_string **samesite) + zend_string **domain, bool *secure, bool *httponly, zend_string **samesite) { zend_string *key; zval *value; @@ -228,7 +228,7 @@ static void php_setcookie_common(INTERNAL_FUNCTION_PARAMETERS, bool is_raw) HashTable *options = NULL; zend_long expires = 0; zend_string *name, *value = NULL, *path = NULL, *domain = NULL, *samesite = NULL; - zend_bool secure = 0, httponly = 0; + bool secure = 0, httponly = 0; ZEND_PARSE_PARAMETERS_START(1, 7) Z_PARAM_STR(name) diff --git a/ext/standard/hrtime.c b/ext/standard/hrtime.c index 29a1132209..3bfd018597 100644 --- a/ext/standard/hrtime.c +++ b/ext/standard/hrtime.c @@ -163,7 +163,7 @@ static zend_always_inline php_hrtime_t _timer_current(void) PHP_FUNCTION(hrtime) { #if HRTIME_AVAILABLE - zend_bool get_as_num = 0; + bool get_as_num = 0; php_hrtime_t t = _timer_current(); ZEND_PARSE_PARAMETERS_START(0, 1) diff --git a/ext/standard/html.c b/ext/standard/html.c index 5806a5a8e9..a13f02dc06 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -365,7 +365,7 @@ static inline unsigned int get_next_char( /* {{{ entity_charset determine_charset * Returns the charset identifier based on an explicitly provided charset, * the internal_encoding and default_charset ini settings, or UTF-8 by default. */ -static enum entity_charset determine_charset(const char *charset_hint, zend_bool quiet) +static enum entity_charset determine_charset(const char *charset_hint, bool quiet) { if (!charset_hint || !*charset_hint) { charset_hint = get_default_charset(); @@ -1100,7 +1100,7 @@ static inline void find_entity_for_char_basic( /* }}} */ /* {{{ php_escape_html_entities */ -PHPAPI zend_string *php_escape_html_entities_ex(const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset, zend_bool double_encode, zend_bool quiet) +PHPAPI zend_string *php_escape_html_entities_ex(const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset, bool double_encode, bool quiet) { size_t cursor, maxlen, len; zend_string *replaced; @@ -1318,7 +1318,7 @@ static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all) zend_string *str, *hint_charset = NULL; zend_long flags = ENT_COMPAT; zend_string *replaced; - zend_bool double_encode = 1; + bool double_encode = 1; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(str) diff --git a/ext/standard/html.h b/ext/standard/html.h index 3aee85cd87..63067e72ee 100644 --- a/ext/standard/html.h +++ b/ext/standard/html.h @@ -45,7 +45,7 @@ void register_html_constants(INIT_FUNC_ARGS); PHPAPI zend_string *php_escape_html_entities(const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset); -PHPAPI zend_string *php_escape_html_entities_ex(const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset, zend_bool double_encode, zend_bool quiet); +PHPAPI zend_string *php_escape_html_entities_ex(const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset, bool double_encode, bool quiet); PHPAPI zend_string *php_unescape_html_entities(zend_string *str, int all, int flags, const char *hint_charset); PHPAPI unsigned int php_next_utf8_char(const unsigned char *str, size_t str_len, size_t *cursor, int *status); diff --git a/ext/standard/http.c b/ext/standard/http.c index 18b7c6070b..b9a1605e7e 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -49,7 +49,7 @@ PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, arg_sep_len = strlen(arg_sep); ZEND_HASH_FOREACH_KEY_VAL(ht, idx, key, zdata) { - zend_bool is_dynamic = 1; + bool is_dynamic = 1; if (Z_TYPE_P(zdata) == IS_INDIRECT) { zdata = Z_INDIRECT_P(zdata); if (Z_ISUNDEF_P(zdata)) { diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index d865d7e2f9..4a1d2dd581 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -103,7 +103,7 @@ static inline void strip_header(char *header_bag, char *lc_header_bag, } } -static zend_bool check_has_header(const char *headers, const char *header) { +static bool check_has_header(const char *headers, const char *header) { const char *s = headers; while ((s = strstr(s, header))) { if (s == headers || *(s-1) == '\n') { @@ -136,16 +136,16 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, zend_string *errstr = NULL; size_t transport_len; int have_header = 0; - zend_bool request_fulluri = 0, ignore_errors = 0; + bool request_fulluri = 0, ignore_errors = 0; struct timeval timeout; char *user_headers = NULL; int header_init = ((flags & HTTP_WRAPPER_HEADER_INIT) != 0); int redirected = ((flags & HTTP_WRAPPER_REDIRECTED) != 0); - zend_bool follow_location = 1; + bool follow_location = 1; php_stream_filter *transfer_encoding = NULL; int response_code; smart_str req_buf = {0}; - zend_bool custom_request_method; + bool custom_request_method; tmp_line[0] = '\0'; diff --git a/ext/standard/image.c b/ext/standard/image.c index fc22ed3f75..2154f8e322 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -1207,7 +1207,7 @@ PHP_FUNCTION(image_type_to_mime_type) PHP_FUNCTION(image_type_to_extension) { zend_long image_type; - zend_bool inc_dot=1; + bool inc_dot=1; const char *imgext = NULL; ZEND_PARSE_PARAMETERS_START(1, 2) diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index b4890238f8..8bdb04bf67 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -179,7 +179,7 @@ PHP_FUNCTION(iptcembed) zend_string *spoolbuf = NULL; unsigned char *poi = NULL; zend_stat_t sb; - zend_bool written = 0; + bool written = 0; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STRING(iptcdata, iptcdata_len) diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 4dfbfb03d0..9301d22ab7 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -57,7 +57,7 @@ extern zend_long php_getuid(void); -static zend_bool php_mail_build_headers_check_field_value(zval *val) +static bool php_mail_build_headers_check_field_value(zval *val) { size_t len = 0; zend_string *value = Z_STR_P(val); @@ -83,7 +83,7 @@ static zend_bool php_mail_build_headers_check_field_value(zval *val) } -static zend_bool php_mail_build_headers_check_field_name(zend_string *key) +static bool php_mail_build_headers_check_field_name(zend_string *key) { size_t len = 0; diff --git a/ext/standard/md5.c b/ext/standard/md5.c index 83d43c4976..1452d57afb 100644 --- a/ext/standard/md5.c +++ b/ext/standard/md5.c @@ -42,7 +42,7 @@ PHPAPI void make_digest_ex(char *md5str, const unsigned char *digest, int len) / PHP_FUNCTION(md5) { zend_string *arg; - zend_bool raw_output = 0; + bool raw_output = 0; PHP_MD5_CTX context; unsigned char digest[16]; @@ -70,7 +70,7 @@ PHP_FUNCTION(md5_file) { char *arg; size_t arg_len; - zend_bool raw_output = 0; + bool raw_output = 0; unsigned char buf[1024]; unsigned char digest[16]; PHP_MD5_CTX context; diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index 1817da00bf..592e1fd4fb 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -45,7 +45,7 @@ #ifdef HAVE_GETTIMEOFDAY static void _php_gettimeofday(INTERNAL_FUNCTION_PARAMETERS, int mode) { - zend_bool get_as_float = 0; + bool get_as_float = 0; struct timeval tp = {0}; ZEND_PARSE_PARAMETERS_START(0, 1) diff --git a/ext/standard/password.c b/ext/standard/password.c index a19266d214..0b98199d05 100644 --- a/ext/standard/password.c +++ b/ext/standard/password.c @@ -117,7 +117,7 @@ static zend_string* php_password_get_salt(zval *unused_, size_t required_salt_le /* bcrypt implementation */ -static zend_bool php_password_bcrypt_valid(const zend_string *hash) { +static bool php_password_bcrypt_valid(const zend_string *hash) { const char *h = ZSTR_VAL(hash); return (ZSTR_LEN(hash) == 60) && (h[0] == '$') && (h[1] == '2') && (h[2] == 'y'); @@ -137,7 +137,7 @@ static int php_password_bcrypt_get_info(zval *return_value, const zend_string *h return SUCCESS; } -static zend_bool php_password_bcrypt_needs_rehash(const zend_string *hash, zend_array *options) { +static bool php_password_bcrypt_needs_rehash(const zend_string *hash, zend_array *options) { zval *znew_cost; zend_long old_cost = PHP_PASSWORD_BCRYPT_COST; zend_long new_cost = PHP_PASSWORD_BCRYPT_COST; @@ -155,7 +155,7 @@ static zend_bool php_password_bcrypt_needs_rehash(const zend_string *hash, zend_ return old_cost != new_cost; } -static zend_bool php_password_bcrypt_verify(const zend_string *password, const zend_string *hash) { +static bool php_password_bcrypt_verify(const zend_string *password, const zend_string *hash) { size_t i; int status = 0; zend_string *ret = php_crypt(ZSTR_VAL(password), (int)ZSTR_LEN(password), ZSTR_VAL(hash), (int)ZSTR_LEN(hash), 1); @@ -276,7 +276,7 @@ static int php_password_argon2_get_info(zval *return_value, const zend_string *h return SUCCESS; } -static zend_bool php_password_argon2_needs_rehash(const zend_string *hash, zend_array *options) { +static bool php_password_argon2_needs_rehash(const zend_string *hash, zend_array *options) { zend_long v = 0; zend_long new_memory_cost = PHP_PASSWORD_ARGON2_MEMORY_COST, memory_cost = 0; zend_long new_time_cost = PHP_PASSWORD_ARGON2_TIME_COST, time_cost = 0; @@ -384,7 +384,7 @@ static zend_string *php_password_argon2_hash(const zend_string *password, zend_a /* argon2i specific methods */ -static zend_bool php_password_argon2i_verify(const zend_string *password, const zend_string *hash) { +static bool php_password_argon2i_verify(const zend_string *password, const zend_string *hash) { return ARGON2_OK == argon2_verify(ZSTR_VAL(hash), ZSTR_VAL(password), ZSTR_LEN(password), Argon2_i); } @@ -403,7 +403,7 @@ const php_password_algo php_password_algo_argon2i = { /* argon2id specific methods */ -static zend_bool php_password_argon2id_verify(const zend_string *password, const zend_string *hash) { +static bool php_password_argon2id_verify(const zend_string *password, const zend_string *hash) { return ARGON2_OK == argon2_verify(ZSTR_VAL(hash), ZSTR_VAL(password), ZSTR_LEN(password), Argon2_id); } @@ -487,7 +487,7 @@ const php_password_algo* php_password_algo_find(const zend_string *ident) { return Z_PTR_P(tmp); } -static const php_password_algo* php_password_algo_find_zval(zend_string *arg_str, zend_long arg_long, zend_bool arg_is_null) { +static const php_password_algo* php_password_algo_find_zval(zend_string *arg_str, zend_long arg_long, bool arg_is_null) { if (arg_is_null) { return php_password_algo_default(); } @@ -601,7 +601,7 @@ PHP_FUNCTION(password_needs_rehash) zend_string *hash; zend_string *new_algo_str; zend_long new_algo_long; - zend_bool new_algo_is_null; + bool new_algo_is_null; zend_array *options = 0; ZEND_PARSE_PARAMETERS_START(2, 3) @@ -649,7 +649,7 @@ PHP_FUNCTION(password_hash) zend_string *password, *digest = NULL; zend_string *algo_str; zend_long algo_long; - zend_bool algo_is_null; + bool algo_is_null; const php_password_algo *algo; zend_array *options = NULL; diff --git a/ext/standard/php_array.h b/ext/standard/php_array.h index a49e12488f..e1e43b5aaf 100644 --- a/ext/standard/php_array.h +++ b/ext/standard/php_array.h @@ -46,7 +46,7 @@ PHPAPI zend_long php_count_recursive(HashTable *ht); ZEND_BEGIN_MODULE_GLOBALS(array) bucket_compare_func_t *multisort_func; - zend_bool compare_deprecation_thrown; + bool compare_deprecation_thrown; ZEND_END_MODULE_GLOBALS(array) #define ARRAYG(v) ZEND_MODULE_GLOBALS_ACCESSOR(array, v) diff --git a/ext/standard/php_crypt.h b/ext/standard/php_crypt.h index a7eabbdd66..572248655e 100644 --- a/ext/standard/php_crypt.h +++ b/ext/standard/php_crypt.h @@ -19,7 +19,7 @@ #ifndef PHP_CRYPT_H #define PHP_CRYPT_H -PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, zend_bool quiet); +PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, bool quiet); PHP_MINIT_FUNCTION(crypt); PHP_MSHUTDOWN_FUNCTION(crypt); PHP_RINIT_FUNCTION(crypt); diff --git a/ext/standard/php_filestat.h b/ext/standard/php_filestat.h index 13b79a4e07..4f76fc39c3 100644 --- a/ext/standard/php_filestat.h +++ b/ext/standard/php_filestat.h @@ -40,7 +40,7 @@ PHP_RSHUTDOWN_FUNCTION(filestat); /* Compatibility. */ typedef size_t php_stat_len; -PHPAPI void php_clear_stat_cache(zend_bool clear_realpath_cache, const char *filename, size_t filename_len); +PHPAPI void php_clear_stat_cache(bool clear_realpath_cache, const char *filename, size_t filename_len); PHPAPI void php_stat(const char *filename, size_t filename_length, int type, zval *return_value); /* Switches for various filestat functions: */ diff --git a/ext/standard/php_incomplete_class.h b/ext/standard/php_incomplete_class.h index f36fd43cfc..fc2caaa62c 100644 --- a/ext/standard/php_incomplete_class.h +++ b/ext/standard/php_incomplete_class.h @@ -40,7 +40,7 @@ extern PHPAPI zend_class_entry *php_ce_incomplete_class; #define PHP_CLASS_ATTRIBUTES \ zend_string *class_name; \ - zend_bool incomplete_class ZEND_ATTRIBUTE_UNUSED = 0 + bool incomplete_class ZEND_ATTRIBUTE_UNUSED = 0 #define INCOMPLETE_CLASS "__PHP_Incomplete_Class" #define MAGIC_MEMBER "__PHP_Incomplete_Class_Name" diff --git a/ext/standard/php_password.h b/ext/standard/php_password.h index 45a21c5c34..2f40e18a34 100644 --- a/ext/standard/php_password.h +++ b/ext/standard/php_password.h @@ -37,10 +37,10 @@ PHP_MSHUTDOWN_FUNCTION(password); typedef struct _php_password_algo { const char *name; zend_string *(*hash)(const zend_string *password, zend_array *options); - zend_bool (*verify)(const zend_string *password, const zend_string *hash); - zend_bool (*needs_rehash)(const zend_string *password, zend_array *options); + bool (*verify)(const zend_string *password, const zend_string *hash); + bool (*needs_rehash)(const zend_string *password, zend_array *options); int (*get_info)(zval *return_value, const zend_string *hash); - zend_bool (*valid)(const zend_string *hash); + bool (*valid)(const zend_string *hash); } php_password_algo; extern const php_password_algo php_password_algo_bcrypt; diff --git a/ext/standard/php_random.h b/ext/standard/php_random.h index 290b37873d..0732e74031 100644 --- a/ext/standard/php_random.h +++ b/ext/standard/php_random.h @@ -34,8 +34,8 @@ typedef struct { #define php_random_int_silent(min, max, result) \ php_random_int((min), (max), (result), 0) -PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw); -PHPAPI int php_random_int(zend_long min, zend_long max, zend_long *result, zend_bool should_throw); +PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw); +PHPAPI int php_random_int(zend_long min, zend_long max, zend_long *result, bool should_throw); #ifdef ZTS # define RANDOM_G(v) ZEND_TSRMG(random_globals_id, php_random_globals *, v) diff --git a/ext/standard/php_string.h b/ext/standard/php_string.h index 43e50dffc1..fa1ebe4411 100644 --- a/ext/standard/php_string.h +++ b/ext/standard/php_string.h @@ -52,14 +52,14 @@ PHPAPI zend_string *php_str_to_str(const char *haystack, size_t length, const ch size_t needle_len, const char *str, size_t str_len); PHPAPI zend_string *php_trim(zend_string *str, const char *what, size_t what_len, int mode); PHPAPI size_t php_strip_tags(char *rbuf, size_t len, const char *allow, size_t allow_len); -PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, const char *allow, size_t allow_len, zend_bool allow_tag_spaces); +PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, const char *allow, size_t allow_len, bool allow_tag_spaces); PHPAPI void php_implode(const zend_string *delim, HashTable *arr, zval *return_value); PHPAPI void php_explode(const zend_string *delim, zend_string *str, zval *return_value, zend_long limit); PHPAPI size_t php_strspn(const char *s1, const char *s2, const char *s1_end, const char *s2_end); PHPAPI size_t php_strcspn(const char *s1, const char *s2, const char *s1_end, const char *s2_end); -PHPAPI int string_natural_compare_function_ex(zval *result, zval *op1, zval *op2, zend_bool case_insensitive); +PHPAPI int string_natural_compare_function_ex(zval *result, zval *op1, zval *op2, bool case_insensitive); PHPAPI int string_natural_compare_function(zval *result, zval *op1, zval *op2); PHPAPI int string_natural_case_compare_function(zval *result, zval *op1, zval *op2); diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 03b55c3eac..bcf4a3a35d 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -520,7 +520,7 @@ static char *create_win_command_from_args(HashTable *args) { smart_string str = {0}; zval *arg_zv; - zend_bool is_prog_name = 1; + bool is_prog_name = 1; int elem_num = 0; ZEND_HASH_FOREACH_VAL(args, arg_zv) { diff --git a/ext/standard/random.c b/ext/standard/random.c index 526347f565..8ab637af7d 100644 --- a/ext/standard/random.c +++ b/ext/standard/random.c @@ -84,7 +84,7 @@ PHP_MSHUTDOWN_FUNCTION(random) /* }}} */ /* {{{ php_random_bytes */ -PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw) +PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw) { #ifdef PHP_WIN32 /* Defer to CryptGenRandom on Windows */ @@ -222,7 +222,7 @@ PHP_FUNCTION(random_bytes) /* }}} */ /* {{{ */ -PHPAPI int php_random_int(zend_long min, zend_long max, zend_long *result, zend_bool should_throw) +PHPAPI int php_random_int(zend_long min, zend_long max, zend_long *result, bool should_throw) { zend_ulong umax; zend_ulong trial; diff --git a/ext/standard/sha1.c b/ext/standard/sha1.c index f5668b9283..810871212c 100644 --- a/ext/standard/sha1.c +++ b/ext/standard/sha1.c @@ -30,7 +30,7 @@ PHPAPI void make_sha1_digest(char *sha1str, const unsigned char *digest) PHP_FUNCTION(sha1) { zend_string *arg; - zend_bool raw_output = 0; + bool raw_output = 0; PHP_SHA1_CTX context; unsigned char digest[20]; @@ -60,7 +60,7 @@ PHP_FUNCTION(sha1_file) { char *arg; size_t arg_len; - zend_bool raw_output = 0; + bool raw_output = 0; unsigned char buf[1024]; unsigned char digest[20]; PHP_SHA1_CTX context; diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 9ca2def099..e6584ca510 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -89,7 +89,7 @@ PHP_FUNCTION(stream_socket_client) zend_string *host; zval *zerrno = NULL, *zerrstr = NULL, *zcontext = NULL; double timeout; - zend_bool timeout_is_null = 1; + bool timeout_is_null = 1; php_timeout_ull conv; struct timeval tv; char *hashkey = NULL; @@ -244,7 +244,7 @@ PHP_FUNCTION(stream_socket_server) PHP_FUNCTION(stream_socket_accept) { double timeout; - zend_bool timeout_is_null = 1; + bool timeout_is_null = 1; zval *zpeername = NULL; zend_string *peername = NULL; php_timeout_ull conv; @@ -305,7 +305,7 @@ PHP_FUNCTION(stream_socket_get_name) { php_stream *stream; zval *zstream; - zend_bool want_peer; + bool want_peer; zend_string *name = NULL; ZEND_PARSE_PARAMETERS_START(2, 2) @@ -419,7 +419,7 @@ PHP_FUNCTION(stream_get_contents) php_stream *stream; zval *zsrc; zend_long maxlen, desiredpos = -1L; - zend_bool maxlen_is_null = 1; + bool maxlen_is_null = 1; zend_string *contents; ZEND_PARSE_PARAMETERS_START(1, 3) @@ -476,7 +476,7 @@ PHP_FUNCTION(stream_copy_to_stream) php_stream *src, *dest; zval *zsrc, *zdest; zend_long maxlen, pos = 0; - zend_bool maxlen_is_null = 1; + bool maxlen_is_null = 1; size_t len; int ret; @@ -748,7 +748,7 @@ PHP_FUNCTION(stream_select) php_socket_t max_fd = 0; int retval, sets = 0; zend_long sec, usec = 0; - zend_bool secnull; + bool secnull; int set_count, max_set_count = 0; ZEND_PARSE_PARAMETERS_START(4, 5) @@ -1313,7 +1313,7 @@ PHP_FUNCTION(stream_get_line) PHP_FUNCTION(stream_set_blocking) { zval *zstream; - zend_bool block; + bool block; php_stream *stream; ZEND_PARSE_PARAMETERS_START(2, 2) @@ -1478,7 +1478,7 @@ PHP_FUNCTION(stream_socket_enable_crypto) zend_long cryptokind = 0; zval *zstream, *zsessstream = NULL; php_stream *stream, *sessstream = NULL; - zend_bool enable, cryptokindnull = 1; + bool enable, cryptokindnull = 1; int ret; ZEND_PARSE_PARAMETERS_START(2, 4) @@ -1641,7 +1641,7 @@ PHP_FUNCTION(sapi_windows_vt100_support) { zval *zsrc; php_stream *stream; - zend_bool enable, enable_is_null = 1; + bool enable, enable_is_null = 1; zend_long fileno; ZEND_PARSE_PARAMETERS_START(1, 2) diff --git a/ext/standard/string.c b/ext/standard/string.c index 05cb98351b..cb37176273 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -248,7 +248,7 @@ static void php_spn_common_handler(INTERNAL_FUNCTION_PARAMETERS, int behavior) / { zend_string *s11, *s22; zend_long start = 0, len = 0; - zend_bool len_is_null = 1; + bool len_is_null = 1; ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_STR(s11) @@ -886,7 +886,7 @@ PHP_FUNCTION(wordwrap) size_t alloced; zend_long current = 0, laststart = 0, lastspace = 0; zend_long linelength = 75; - zend_bool docut = 0; + bool docut = 0; zend_string *newtext; ZEND_PARSE_PARAMETERS_START(1, 4) @@ -1739,7 +1739,7 @@ PHP_FUNCTION(stristr) size_t found_offset; char *haystack_dup; char *orig_needle; - zend_bool part = 0; + bool part = 0; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(haystack) @@ -1774,7 +1774,7 @@ PHP_FUNCTION(strstr) zend_string *haystack, *needle; const char *found = NULL; zend_long found_offset; - zend_bool part = 0; + bool part = 0; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(haystack) @@ -2164,7 +2164,7 @@ PHP_FUNCTION(substr) { zend_string *str; zend_long l = 0, f; - zend_bool len_is_null = 1; + bool len_is_null = 1; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(str) @@ -2220,7 +2220,7 @@ PHP_FUNCTION(substr_replace) zend_long from_long; HashTable *len_ht = NULL; zend_long len_long; - zend_bool len_is_null = 1; + bool len_is_null = 1; zend_long l = 0; zend_long f; zend_string *result; @@ -4451,7 +4451,7 @@ PHP_FUNCTION(nl2br) zend_string *str; char *target; size_t repl_cnt = 0; - zend_bool is_xhtml = 1; + bool is_xhtml = 1; zend_string *result; ZEND_PARSE_PARAMETERS_START(1, 2) @@ -4798,7 +4798,7 @@ PHPAPI size_t php_strip_tags(char *rbuf, size_t len, const char *allow, size_t a swm: Added ability to strip <?xml tags without assuming it PHP code. */ -PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, const char *allow, size_t allow_len, zend_bool allow_tag_spaces) +PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, const char *allow, size_t allow_len, bool allow_tag_spaces) { char *tbuf, *tp, *rp, c, lc; const char *buf, *p, *end; @@ -5286,7 +5286,7 @@ static void php_strnatcmp(INTERNAL_FUNCTION_PARAMETERS, int fold_case) } /* }}} */ -PHPAPI int string_natural_compare_function_ex(zval *result, zval *op1, zval *op2, zend_bool case_insensitive) /* {{{ */ +PHPAPI int string_natural_compare_function_ex(zval *result, zval *op1, zval *op2, bool case_insensitive) /* {{{ */ { zend_string *tmp_str1, *tmp_str2; zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1); @@ -5385,7 +5385,7 @@ PHP_FUNCTION(substr_count) { char *haystack, *needle; zend_long offset = 0, length = 0; - zend_bool length_is_null = 1; + bool length_is_null = 1; zend_long count = 0; size_t haystack_len, needle_len; const char *p, *endp; @@ -5859,8 +5859,8 @@ PHP_FUNCTION(substr_compare) { zend_string *s1, *s2; zend_long offset, len=0; - zend_bool len_is_default=1; - zend_bool cs=0; + bool len_is_default=1; + bool cs=0; size_t cmp_len; ZEND_PARSE_PARAMETERS_START(3, 5) diff --git a/ext/standard/type.c b/ext/standard/type.c index 5a8b2a0b9d..afe0e7afc2 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -390,8 +390,8 @@ PHP_FUNCTION(is_callable) zval *var, *callable_name = NULL; zend_string *name; char *error; - zend_bool retval; - zend_bool syntax_only = 0; + bool retval; + bool syntax_only = 0; int check_flags = 0; ZEND_PARSE_PARAMETERS_START(1, 3) diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c index 89c4bc8736..0dc9098af0 100644 --- a/ext/standard/uniqid.c +++ b/ext/standard/uniqid.c @@ -41,7 +41,7 @@ ZEND_TLS struct timeval prev_tv = { 0, 0 }; PHP_FUNCTION(uniqid) { char *prefix = ""; - zend_bool more_entropy = 0; + bool more_entropy = 0; zend_string *uniqid; int sec, usec; size_t prefix_len = 0; diff --git a/ext/standard/url.c b/ext/standard/url.c index 113e010024..c700367ee1 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -111,13 +111,13 @@ static int is_userinfo_valid(const char *str, size_t len) /* {{{ php_url_parse */ PHPAPI php_url *php_url_parse_ex(char const *str, size_t length) { - zend_bool has_port; + bool has_port; return php_url_parse_ex2(str, length, &has_port); } /* {{{ php_url_parse_ex2 */ -PHPAPI php_url *php_url_parse_ex2(char const *str, size_t length, zend_bool *has_port) +PHPAPI php_url *php_url_parse_ex2(char const *str, size_t length, bool *has_port) { char port_buf[6]; php_url *ret = ecalloc(1, sizeof(php_url)); @@ -355,7 +355,7 @@ PHP_FUNCTION(parse_url) php_url *resource; zend_long key = -1; zval tmp; - zend_bool has_port; + bool has_port; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STRING(str, str_len) @@ -478,7 +478,7 @@ static int php_htoi(char *s) static const unsigned char hexchars[] = "0123456789ABCDEF"; -static zend_always_inline zend_string *php_url_encode_impl(const char *s, size_t len, zend_bool raw) /* {{{ */ { +static zend_always_inline zend_string *php_url_encode_impl(const char *s, size_t len, bool raw) /* {{{ */ { register unsigned char c; unsigned char *to; unsigned char const *from, *end; @@ -703,7 +703,7 @@ PHP_FUNCTION(get_headers) size_t url_len; php_stream *stream; zval *prev_val, *hdr = NULL; - zend_bool format = 0; + bool format = 0; zval *zcontext = NULL; php_stream_context *context; diff --git a/ext/standard/url.h b/ext/standard/url.h index a751aa4ee1..6483b7211b 100644 --- a/ext/standard/url.h +++ b/ext/standard/url.h @@ -31,7 +31,7 @@ typedef struct php_url { PHPAPI void php_url_free(php_url *theurl); PHPAPI php_url *php_url_parse(char const *str); PHPAPI php_url *php_url_parse_ex(char const *str, size_t length); -PHPAPI php_url *php_url_parse_ex2(char const *str, size_t length, zend_bool *has_port); +PHPAPI php_url *php_url_parse_ex2(char const *str, size_t length, bool *has_port); PHPAPI size_t php_url_decode(char *str, size_t len); /* return value: length of decoded string */ PHPAPI size_t php_raw_url_decode(char *str, size_t len); /* return value: length of decoded string */ PHPAPI zend_string *php_url_encode(char const *s, size_t len); diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re index bef17733e2..7cfd848717 100644 --- a/ext/standard/url_scanner_ex.re +++ b/ext/standard/url_scanner_ex.re @@ -619,7 +619,7 @@ PHPAPI char *php_url_scanner_adapt_single_url(const char *url, size_t urllen, co } -static char *url_adapt_ext(const char *src, size_t srclen, size_t *newlen, zend_bool do_flush, url_adapt_state_ex_t *ctx) +static char *url_adapt_ext(const char *src, size_t srclen, size_t *newlen, bool do_flush, url_adapt_state_ex_t *ctx) { char *retval; @@ -690,7 +690,7 @@ static inline void php_url_scanner_session_handler_impl(char *output, size_t out } if (ZSTR_LEN(url_state->url_app.s) != 0) { - *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT | PHP_OUTPUT_HANDLER_FLUSH | PHP_OUTPUT_HANDLER_FINAL) ? 1 : 0), url_state); + *handled_output = url_adapt_ext(output, output_len, &len, (bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT | PHP_OUTPUT_HANDLER_FLUSH | PHP_OUTPUT_HANDLER_FINAL) ? 1 : 0), url_state); if (sizeof(unsigned int) < sizeof(size_t)) { if (len > UINT_MAX) len = UINT_MAX; @@ -842,7 +842,7 @@ static inline int php_url_scanner_reset_var_impl(zend_string *name, int encode, smart_str form_app = {0}; zend_string *encoded; int ret = SUCCESS; - zend_bool sep_removed = 0; + bool sep_removed = 0; url_adapt_state_ex_t *url_state; if (type) { diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c index 758f79ff11..6c5574f991 100644 --- a/ext/standard/user_filters.c +++ b/ext/standard/user_filters.c @@ -42,7 +42,7 @@ static int le_bucket; PHP_METHOD(php_user_filter, filter) { zval *in, *out, *consumed; - zend_bool closing; + bool closing; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rrzb", &in, &out, &consumed, &closing) == FAILURE) { RETURN_THROWS(); } diff --git a/ext/standard/var.c b/ext/standard/var.c index 91cc95c6bd..5c13846a82 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -620,7 +620,7 @@ PHPAPI void php_var_export(zval *struc, int level) /* {{{ */ PHP_FUNCTION(var_export) { zval *var; - zend_bool return_output = 0; + bool return_output = 0; smart_str buf = {0}; ZEND_PARSE_PARAMETERS_START(1, 2) @@ -647,7 +647,7 @@ static inline zend_long php_add_var_hash(php_serialize_data_t data, zval *var) / { zval *zv; zend_ulong key; - zend_bool is_ref = Z_ISREF_P(var); + bool is_ref = Z_ISREF_P(var); data->n += 1; @@ -707,7 +707,7 @@ static inline void php_var_serialize_string(smart_str *buf, char *str, size_t le } /* }}} */ -static inline zend_bool php_var_serialize_class_name(smart_str *buf, zval *struc) /* {{{ */ +static inline bool php_var_serialize_class_name(smart_str *buf, zval *struc) /* {{{ */ { PHP_CLASS_ATTRIBUTES; @@ -877,7 +877,7 @@ static int php_var_serialize_get_sleep_props( } /* }}} */ -static void php_var_serialize_nested_data(smart_str *buf, zval *struc, HashTable *ht, uint32_t count, zend_bool incomplete_class, php_serialize_data_t var_hash) /* {{{ */ +static void php_var_serialize_nested_data(smart_str *buf, zval *struc, HashTable *ht, uint32_t count, bool incomplete_class, php_serialize_data_t var_hash) /* {{{ */ { smart_str_append_unsigned(buf, count); smart_str_appendl(buf, ":{", 2); @@ -998,7 +998,7 @@ again: case IS_OBJECT: { zend_class_entry *ce = Z_OBJCE_P(struc); - zend_bool incomplete_class; + bool incomplete_class; uint32_t count; if (ce->__serialize) { @@ -1309,7 +1309,7 @@ PHP_FUNCTION(unserialize) /* {{{ Returns the allocated by PHP memory */ PHP_FUNCTION(memory_get_usage) { - zend_bool real_usage = 0; + bool real_usage = 0; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL @@ -1322,7 +1322,7 @@ PHP_FUNCTION(memory_get_usage) { /* {{{ Returns the peak allocated by PHP memory */ PHP_FUNCTION(memory_get_peak_usage) { - zend_bool real_usage = 0; + bool real_usage = 0; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index 1b191a0367..c5a1476938 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -217,7 +217,7 @@ PHPAPI void var_destroy(php_unserialize_data_t *var_hashx) zend_long i; var_entries *var_hash = (*var_hashx)->entries.next; var_dtor_entries *var_dtor_hash = (*var_hashx)->first_dtor; - zend_bool delayed_call_failed = 0; + bool delayed_call_failed = 0; zval wakeup_name; ZVAL_UNDEF(&wakeup_name); @@ -688,10 +688,10 @@ static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce) #ifdef PHP_WIN32 # pragma optimize("", off) #endif -static inline int object_common(UNSERIALIZE_PARAMETER, zend_long elements, zend_bool has_unserialize) +static inline int object_common(UNSERIALIZE_PARAMETER, zend_long elements, bool has_unserialize) { HashTable *ht; - zend_bool has_wakeup; + bool has_wakeup; if (has_unserialize) { zval ary, *tmp; @@ -1034,9 +1034,9 @@ object ":" uiv ":" ["] { char *str; zend_string *class_name; zend_class_entry *ce; - zend_bool incomplete_class = 0; - zend_bool custom_object = 0; - zend_bool has_unserialize = 0; + bool incomplete_class = 0; + bool custom_object = 0; + bool has_unserialize = 0; zval user_func; zval retval; diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index c12eaa0674..8f24d7e017 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -281,7 +281,7 @@ PHP_FUNCTION(msg_receive) zval *out_message, *queue, *out_msgtype, *zerrcode = NULL; zend_long desiredmsgtype, maxsize, flags = 0; zend_long realflags = 0; - zend_bool do_unserialize = 1; + bool do_unserialize = 1; sysvmsg_queue_t *mq = NULL; struct php_msgbuf *messagebuffer = NULL; /* buffer to transmit */ int result; @@ -363,7 +363,7 @@ PHP_FUNCTION(msg_send) { zval *message, *queue, *zerror=NULL; zend_long msgtype; - zend_bool do_serialize = 1, blocking = 1; + bool do_serialize = 1, blocking = 1; sysvmsg_queue_t * mq = NULL; struct php_msgbuf * messagebuffer = NULL; /* buffer to transmit */ int result; diff --git a/ext/sysvsem/sysvsem.c b/ext/sysvsem/sysvsem.c index dbde858ab9..46116e212e 100644 --- a/ext/sysvsem/sysvsem.c +++ b/ext/sysvsem/sysvsem.c @@ -188,7 +188,7 @@ PHP_MINFO_FUNCTION(sysvsem) PHP_FUNCTION(sem_get) { zend_long key, max_acquire = 1, perm = 0666; - zend_bool auto_release = 1; + bool auto_release = 1; int semid; struct sembuf sop[3]; int count; @@ -298,7 +298,7 @@ PHP_FUNCTION(sem_get) static void php_sysvsem_semop(INTERNAL_FUNCTION_PARAMETERS, int acquire) { zval *arg_id; - zend_bool nowait = 0; + bool nowait = 0; sysvsem_sem *sem_ptr; struct sembuf sop; diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c index e3a6d9501b..96b437b419 100644 --- a/ext/sysvshm/sysvshm.c +++ b/ext/sysvshm/sysvshm.c @@ -136,7 +136,7 @@ PHP_FUNCTION(shm_attach) char *shm_ptr; sysvshm_chunk_head *chunk_ptr; zend_long shm_key, shm_id, shm_size, shm_flag = 0666; - zend_bool shm_size_is_null = 1; + bool shm_size_is_null = 1; if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "l|l!l", &shm_key, &shm_size, &shm_size_is_null, &shm_flag)) { RETURN_THROWS(); diff --git a/ext/tidy/php_tidy.h b/ext/tidy/php_tidy.h index ab9e90eb93..35869482e1 100644 --- a/ext/tidy/php_tidy.h +++ b/ext/tidy/php_tidy.h @@ -25,7 +25,7 @@ extern zend_module_entry tidy_module_entry; ZEND_BEGIN_MODULE_GLOBALS(tidy) char *default_config; - zend_bool clean_output; + bool clean_output; ZEND_END_MODULE_GLOBALS(tidy) #define TG(v) ZEND_MODULE_GLOBALS_ACCESSOR(tidy, v) diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c index 5b53f65578..40c55c4add 100644 --- a/ext/tidy/tidy.c +++ b/ext/tidy/tidy.c @@ -205,7 +205,7 @@ static inline PHPTidyObj *php_tidy_fetch_object(zend_object *obj) { /* }}} */ /* {{{ ext/tidy prototypes */ -static zend_string *php_tidy_file_to_mem(char *, zend_bool); +static zend_string *php_tidy_file_to_mem(char *, bool); static void tidy_object_free_storage(zend_object *); static zend_object *tidy_object_new_node(zend_class_entry *); static zend_object *tidy_object_new_doc(zend_class_entry *); @@ -335,7 +335,7 @@ static int _php_tidy_set_tidy_opt(TidyDoc doc, char *optname, zval *value) return FAILURE; } -static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_file) +static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, bool is_file) { char *enc = NULL; size_t enc_len = 0; @@ -345,7 +345,7 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_fil HashTable *config_ht = NULL; if (is_file) { - zend_bool use_include_path = 0; + bool use_include_path = 0; ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_PATH_STR(arg1) @@ -432,7 +432,7 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_fil tidyRelease(doc); } -static zend_string *php_tidy_file_to_mem(char *filename, zend_bool use_include_path) +static zend_string *php_tidy_file_to_mem(char *filename, bool use_include_path) { php_stream *stream; zend_string *data = NULL; @@ -895,16 +895,16 @@ static PHP_MINFO_FUNCTION(tidy) static PHP_INI_MH(php_tidy_set_clean_output) { int status; - zend_bool value; + bool value; if (ZSTR_LEN(new_value)==2 && strcasecmp("on", ZSTR_VAL(new_value))==0) { - value = (zend_bool) 1; + value = (bool) 1; } else if (ZSTR_LEN(new_value)==3 && strcasecmp("yes", ZSTR_VAL(new_value))==0) { - value = (zend_bool) 1; + value = (bool) 1; } else if (ZSTR_LEN(new_value)==4 && strcasecmp("true", ZSTR_VAL(new_value))==0) { - value = (zend_bool) 1; + value = (bool) 1; } else { - value = (zend_bool) atoi(ZSTR_VAL(new_value)); + value = (bool) atoi(ZSTR_VAL(new_value)); } if (stage == PHP_INI_STAGE_RUNTIME) { @@ -1063,7 +1063,7 @@ PHP_FUNCTION(tidy_parse_file) { char *enc = NULL; size_t enc_len = 0; - zend_bool use_include_path = 0; + bool use_include_path = 0; zend_string *inputfile, *contents, *options_str = NULL; HashTable *options_ht = NULL; @@ -1357,7 +1357,7 @@ PHP_METHOD(tidy, __construct) { char *enc = NULL; size_t enc_len = 0; - zend_bool use_include_path = 0; + bool use_include_path = 0; HashTable *options_ht = NULL; zend_string *contents, *inputfile = NULL, *options_str = NULL; PHPTidyObj *obj; @@ -1396,7 +1396,7 @@ PHP_METHOD(tidy, parseFile) { char *enc = NULL; size_t enc_len = 0; - zend_bool use_include_path = 0; + bool use_include_path = 0; HashTable *options_ht = NULL; zend_string *inputfile, *contents, *options_str = NULL; PHPTidyObj *obj; diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c index 7567a270af..43296760e4 100644 --- a/ext/tokenizer/tokenizer.c +++ b/ext/tokenizer/tokenizer.c @@ -89,7 +89,7 @@ static zend_string *php_token_get_text(zval *obj) { return Z_STR_P(text_zval); } -static zend_bool tokenize_common( +static bool tokenize_common( zval *return_value, zend_string *source, zend_long flags, zend_class_entry *token_class); PHP_METHOD(PhpToken, tokenize) @@ -345,7 +345,7 @@ static void add_token( zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &token); } -static zend_bool tokenize(zval *return_value, zend_string *source, zend_class_entry *token_class) +static bool tokenize(zval *return_value, zend_string *source, zend_class_entry *token_class) { zval source_zval; zend_lex_state original_lex_state; @@ -477,15 +477,15 @@ void on_event( } } -static zend_bool tokenize_parse( +static bool tokenize_parse( zval *return_value, zend_string *source, zend_class_entry *token_class) { zval source_zval; struct event_context ctx; zval token_stream; zend_lex_state original_lex_state; - zend_bool original_in_compilation; - zend_bool success; + bool original_in_compilation; + bool success; ZVAL_STR_COPY(&source_zval, source); @@ -523,7 +523,7 @@ static zend_bool tokenize_parse( return success; } -static zend_bool tokenize_common( +static bool tokenize_common( zval *return_value, zend_string *source, zend_long flags, zend_class_entry *token_class) { if (flags & TOKEN_PARSE) { diff --git a/ext/xml/xml.c b/ext/xml/xml.c index eebccca19c..ced0ac7d5d 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -1249,7 +1249,7 @@ PHP_FUNCTION(xml_parse) char *data; size_t data_len; int ret; - zend_bool isFinal = 0; + bool isFinal = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|b", &pind, xml_parser_ce, &data, &data_len, &isFinal) == FAILURE) { RETURN_THROWS(); diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index afc8cc80ba..2a8eed34fe 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -964,7 +964,7 @@ PHP_METHOD(XMLReader, setParserProperty) zval *id; zend_long property; int retval = -1; - zend_bool value; + bool value; xmlreader_object *intern; if (zend_parse_parameters(ZEND_NUM_ARGS(), "lb", &property, &value) == FAILURE) { diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c index 61e4a3a7d9..6934feb77e 100644 --- a/ext/xmlwriter/php_xmlwriter.c +++ b/ext/xmlwriter/php_xmlwriter.c @@ -252,7 +252,7 @@ PHP_FUNCTION(xmlwriter_set_indent) { xmlTextWriterPtr ptr; int retval; - zend_bool indent; + bool indent; zval *self; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Ob", &self, xmlwriter_class_entry_ce, &indent) == FAILURE) { @@ -814,7 +814,7 @@ PHP_FUNCTION(xmlwriter_start_dtd_entity) char *name; size_t name_len; int retval; - zend_bool isparm; + bool isparm; zval *self; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Osb", &self, xmlwriter_class_entry_ce, &name, &name_len, &isparm) == FAILURE) { @@ -851,7 +851,7 @@ PHP_FUNCTION(xmlwriter_write_dtd_entity) int retval; /* Optional parameters */ char *pubid = NULL, *sysid = NULL, *ndataid = NULL; - zend_bool pe = 0; + bool pe = 0; size_t pubid_len, sysid_len, ndataid_len; zval *self; @@ -985,7 +985,7 @@ PHP_FUNCTION(xmlwriter_open_memory) static void php_xmlwriter_flush(INTERNAL_FUNCTION_PARAMETERS, int force_string) { xmlTextWriterPtr ptr; xmlBufferPtr buffer; - zend_bool empty = 1; + bool empty = 1; int output_bytes; zval *self; diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 6875850687..fd1585d472 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -2996,7 +2996,7 @@ PHP_METHOD(ZipArchive, registerCancelCallback) PHP_METHOD(ZipArchive, isCompressionMethodSupported) { zend_long method; - zend_bool enc = 1; + bool enc = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|b", &method, &enc) == FAILURE) { return; @@ -3009,7 +3009,7 @@ PHP_METHOD(ZipArchive, isCompressionMethodSupported) PHP_METHOD(ZipArchive, isEncryptionMethodSupported) { zend_long method; - zend_bool enc = 1; + bool enc = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|b", &method, &enc) == FAILURE) { return; diff --git a/ext/zlib/php_zlib.h b/ext/zlib/php_zlib.h index 6c43625217..d32bac7346 100644 --- a/ext/zlib/php_zlib.h +++ b/ext/zlib/php_zlib.h @@ -57,7 +57,7 @@ ZEND_BEGIN_MODULE_GLOBALS(zlib) char *output_handler; php_zlib_context *ob_gzhandler; zend_long output_compression_default; - zend_bool handler_registered; + bool handler_registered; int compression_coding; ZEND_END_MODULE_GLOBALS(zlib); diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index eab3b02ca5..b284b8a494 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -788,7 +788,7 @@ PHP_ZLIB_DECODE_FUNC(gzdecode, PHP_ZLIB_ENCODING_GZIP); PHP_ZLIB_DECODE_FUNC(gzuncompress, PHP_ZLIB_ENCODING_DEFLATE); /* }}} */ -static zend_bool zlib_create_dictionary_string(HashTable *options, char **dict, size_t *dictlen) { +static bool zlib_create_dictionary_string(HashTable *options, char **dict, size_t *dictlen) { zval *option_buffer; if (options && (option_buffer = zend_hash_str_find(options, ZEND_STRL("dictionary"))) != NULL) { diff --git a/ext/zlib/zlib_filter.c b/ext/zlib/zlib_filter.c index cdd981afde..1723ef904f 100644 --- a/ext/zlib/zlib_filter.c +++ b/ext/zlib/zlib_filter.c @@ -27,7 +27,7 @@ typedef struct _php_zlib_filter_data { unsigned char *outbuf; size_t outbuf_len; int persistent; - zend_bool finished; /* for zlib.deflate: signals that no flush is pending */ + bool finished; /* for zlib.deflate: signals that no flush is pending */ } php_zlib_filter_data; /* }}} */ diff --git a/main/SAPI.c b/main/SAPI.c index 0a7f219e84..79d9610a53 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -606,7 +606,7 @@ static void sapi_remove_header(zend_llist *l, char *name, size_t len) { } } -SAPI_API int sapi_add_header_ex(const char *header_line, size_t header_line_len, zend_bool duplicate, zend_bool replace) +SAPI_API int sapi_add_header_ex(const char *header_line, size_t header_line_len, bool duplicate, bool replace) { sapi_header_line ctr = {0}; int r; diff --git a/main/SAPI.h b/main/SAPI.h index b0d2928369..4de2189a6d 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -83,9 +83,9 @@ typedef struct { const char *content_type; - zend_bool headers_only; - zend_bool no_headers; - zend_bool headers_read; + bool headers_only; + bool no_headers; + bool headers_read; sapi_post_entry *post_entry; @@ -122,7 +122,7 @@ typedef struct _sapi_globals_struct { HashTable *rfc1867_uploaded_files; zend_long post_max_size; int options; - zend_bool sapi_started; + bool sapi_started; double global_request_time; HashTable known_post_content_types; zval callback_func; @@ -177,7 +177,7 @@ BEGIN_EXTERN_C() SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg); /* Deprecated functions. Use sapi_header_op instead. */ -SAPI_API int sapi_add_header_ex(const char *header_line, size_t header_line_len, zend_bool duplicate, zend_bool replace); +SAPI_API int sapi_add_header_ex(const char *header_line, size_t header_line_len, bool duplicate, bool replace); #define sapi_add_header(a, b, c) sapi_add_header_ex((a),(b),(c),1) diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 88519bc726..633c5e3b2b 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -342,7 +342,7 @@ PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle) char *filename = NULL; zend_string *resolved_path = NULL; size_t length; - zend_bool orig_display_errors; + bool orig_display_errors; path_info = SG(request_info).request_uri; #if HAVE_PWD_H diff --git a/main/main.c b/main/main.c index 8ab7c55067..b5115663b8 100644 --- a/main/main.c +++ b/main/main.c @@ -1138,7 +1138,7 @@ static void clear_last_error() { static void report_zend_debug_error_notify_cb(int type, const char *error_filename, uint32_t error_lineno, zend_string *message) { if (PG(report_zend_debug)) { - zend_bool trigger_break; + bool trigger_break; switch (type) { case E_ERROR: @@ -1162,7 +1162,7 @@ static void report_zend_debug_error_notify_cb(int type, const char *error_filena extended error handling function */ static ZEND_COLD void php_error_cb(int orig_type, const char *error_filename, const uint32_t error_lineno, zend_string *message) { - zend_bool display; + bool display; int type = orig_type & E_ALL; /* check for repeated errors to be ignored */ @@ -1727,7 +1727,7 @@ int php_request_startup(void) /* {{{ php_request_shutdown */ void php_request_shutdown(void *dummy) { - zend_bool report_memleaks; + bool report_memleaks; EG(flags) |= EG_FLAGS_IN_SHUTDOWN; @@ -1757,7 +1757,7 @@ void php_request_shutdown(void *dummy) /* 3. Flush all output buffers */ zend_try { - zend_bool send_buffer = SG(request_info).headers_only ? 0 : 1; + bool send_buffer = SG(request_info).headers_only ? 0 : 1; if (CG(unclean_shutdown) && PG(last_error_type) == E_ERROR && (size_t)PG(memory_limit) < zend_memory_usage(1) diff --git a/main/output.c b/main/output.c index eef8ad3bfc..ec844973c5 100644 --- a/main/output.c +++ b/main/output.c @@ -807,7 +807,7 @@ static inline void php_output_context_reset(php_output_context *context) /* {{{ static void php_output_context_feed(php_output_context *context, char *, size_t, size_t) * Feed output contexts input buffer */ -static inline void php_output_context_feed(php_output_context *context, char *data, size_t size, size_t used, zend_bool free) +static inline void php_output_context_feed(php_output_context *context, char *data, size_t size, size_t used, bool free) { if (context->in.free && context->in.data) { efree(context->in.data); @@ -1491,7 +1491,7 @@ PHP_FUNCTION(ob_list_handlers) /* {{{ Return the status of the active or all output buffers */ PHP_FUNCTION(ob_get_status) { - zend_bool full_status = 0; + bool full_status = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &full_status) == FAILURE) { RETURN_THROWS(); diff --git a/main/php_globals.h b/main/php_globals.h index e079866645..e619694d18 100644 --- a/main/php_globals.h +++ b/main/php_globals.h @@ -51,11 +51,11 @@ typedef struct _arg_separators { } arg_separators; struct _php_core_globals { - zend_bool implicit_flush; + bool implicit_flush; zend_long output_buffering; - zend_bool enable_dl; + bool enable_dl; char *output_handler; @@ -66,12 +66,12 @@ struct _php_core_globals { zend_long max_input_time; zend_uchar display_errors; - zend_bool display_startup_errors; - zend_bool log_errors; + bool display_startup_errors; + bool log_errors; zend_long log_errors_max_len; - zend_bool ignore_repeated_errors; - zend_bool ignore_repeated_source; - zend_bool report_memleaks; + bool ignore_repeated_errors; + bool ignore_repeated_source; + bool report_memleaks; char *error_log; char *doc_root; @@ -102,7 +102,7 @@ struct _php_core_globals { HashTable rfc1867_protected_variables; short connection_status; - zend_bool ignore_user_abort; + bool ignore_user_abort; unsigned char header_is_being_sent; @@ -110,27 +110,27 @@ struct _php_core_globals { zval http_globals[6]; - zend_bool expose_php; + bool expose_php; - zend_bool register_argc_argv; - zend_bool auto_globals_jit; + bool register_argc_argv; + bool auto_globals_jit; char *docref_root; char *docref_ext; - zend_bool html_errors; - zend_bool xmlrpc_errors; + bool html_errors; + bool xmlrpc_errors; zend_long xmlrpc_error_number; - zend_bool activated_auto_globals[8]; + bool activated_auto_globals[8]; - zend_bool modules_activated; - zend_bool file_uploads; - zend_bool during_request_startup; - zend_bool allow_url_fopen; - zend_bool enable_post_data_reading; - zend_bool report_zend_debug; + bool modules_activated; + bool file_uploads; + bool during_request_startup; + bool allow_url_fopen; + bool enable_post_data_reading; + bool report_zend_debug; int last_error_type; zend_string *last_error_message; @@ -140,31 +140,31 @@ struct _php_core_globals { char *php_sys_temp_dir; char *disable_classes; - zend_bool allow_url_include; + bool allow_url_include; #ifdef PHP_WIN32 - zend_bool com_initialized; + bool com_initialized; #endif zend_long max_input_nesting_level; zend_long max_input_vars; - zend_bool in_user_include; + bool in_user_include; char *user_ini_filename; zend_long user_ini_cache_ttl; char *request_order; - zend_bool mail_x_header; + bool mail_x_header; char *mail_log; - zend_bool in_error_log; + bool in_error_log; #ifdef PHP_WIN32 - zend_bool windows_show_crt_warning; + bool windows_show_crt_warning; #endif zend_long syslog_facility; char *syslog_ident; - zend_bool have_called_openlog; + bool have_called_openlog; zend_long syslog_filter; }; diff --git a/main/php_ini.c b/main/php_ini.c index 52e3a20ebf..0fa3a33365 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -117,7 +117,7 @@ PHPAPI ZEND_COLD void display_ini_entries(zend_module_entry *module) { int module_number; zend_ini_entry *ini_entry; - zend_bool first = 1; + bool first = 1; if (module) { module_number = module->module_number; diff --git a/main/php_variables.c b/main/php_variables.c index 312c22ef07..4c284cacfb 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -62,7 +62,7 @@ PHPAPI void php_register_variable_ex(const char *var_name, zval *val, zval *trac char *var, *var_orig; size_t var_len, index_len; zval gpc_element, *gpc_element_p; - zend_bool is_array = 0; + bool is_array = 0; HashTable *symtable1 = NULL; ALLOCA_FLAG(use_heap) @@ -276,7 +276,7 @@ typedef struct post_var_data { size_t already_scanned; } post_var_data_t; -static zend_bool add_post_var(zval *arr, post_var_data_t *var, zend_bool eof) +static bool add_post_var(zval *arr, post_var_data_t *var, bool eof) { char *start, *ksep, *vsep, *val; size_t klen, vlen; @@ -327,7 +327,7 @@ static zend_bool add_post_var(zval *arr, post_var_data_t *var, zend_bool eof) return 1; } -static inline int add_post_vars(zval *arr, post_var_data_t *vars, zend_bool eof) +static inline int add_post_vars(zval *arr, post_var_data_t *vars, bool eof) { uint64_t max_vars = PG(max_input_vars); @@ -581,7 +581,7 @@ void _php_import_environment_variables(zval *array_ptr) tsrm_env_unlock(); } -zend_bool php_std_auto_global_callback(char *name, uint32_t name_len) +bool php_std_auto_global_callback(char *name, uint32_t name_len) { zend_printf("%s\n", name); return 0; /* don't rearm */ @@ -727,7 +727,7 @@ PHPAPI int php_hash_environment(void) } /* }}} */ -static zend_bool php_auto_globals_create_get(zend_string *name) +static bool php_auto_globals_create_get(zend_string *name) { if (PG(variables_order) && (strchr(PG(variables_order),'G') || strchr(PG(variables_order),'g'))) { sapi_module.treat_data(PARSE_GET, NULL, NULL); @@ -742,7 +742,7 @@ static zend_bool php_auto_globals_create_get(zend_string *name) return 0; /* don't rearm */ } -static zend_bool php_auto_globals_create_post(zend_string *name) +static bool php_auto_globals_create_post(zend_string *name) { if (PG(variables_order) && (strchr(PG(variables_order),'P') || strchr(PG(variables_order),'p')) && @@ -761,7 +761,7 @@ static zend_bool php_auto_globals_create_post(zend_string *name) return 0; /* don't rearm */ } -static zend_bool php_auto_globals_create_cookie(zend_string *name) +static bool php_auto_globals_create_cookie(zend_string *name) { if (PG(variables_order) && (strchr(PG(variables_order),'C') || strchr(PG(variables_order),'c'))) { sapi_module.treat_data(PARSE_COOKIE, NULL, NULL); @@ -776,7 +776,7 @@ static zend_bool php_auto_globals_create_cookie(zend_string *name) return 0; /* don't rearm */ } -static zend_bool php_auto_globals_create_files(zend_string *name) +static bool php_auto_globals_create_files(zend_string *name) { if (Z_TYPE(PG(http_globals)[TRACK_VARS_FILES]) == IS_UNDEF) { array_init(&PG(http_globals)[TRACK_VARS_FILES]); @@ -804,7 +804,7 @@ static void check_http_proxy(HashTable *var_table) } } -static zend_bool php_auto_globals_create_server(zend_string *name) +static bool php_auto_globals_create_server(zend_string *name) { if (PG(variables_order) && (strchr(PG(variables_order),'S') || strchr(PG(variables_order),'s'))) { php_register_server_variables(); @@ -841,7 +841,7 @@ static zend_bool php_auto_globals_create_server(zend_string *name) return 0; /* don't rearm */ } -static zend_bool php_auto_globals_create_env(zend_string *name) +static bool php_auto_globals_create_env(zend_string *name) { zval_ptr_dtor_nogc(&PG(http_globals)[TRACK_VARS_ENV]); array_init(&PG(http_globals)[TRACK_VARS_ENV]); @@ -857,7 +857,7 @@ static zend_bool php_auto_globals_create_env(zend_string *name) return 0; /* don't rearm */ } -static zend_bool php_auto_globals_create_request(zend_string *name) +static bool php_auto_globals_create_request(zend_string *name) { zval form_variables; unsigned char _gpc_flags[3] = {0, 0, 0}; diff --git a/main/rfc1867.c b/main/rfc1867.c index 8ef83f443d..6e96c3ea19 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -52,7 +52,7 @@ static php_rfc1867_basename_t php_rfc1867_basename = NULL; PHPAPI int (*php_rfc1867_callback)(unsigned int event, void *event_data, void **extra) = NULL; -static void safe_php_register_variable(char *var, char *strval, size_t val_len, zval *track_vars_array, zend_bool override_protection); +static void safe_php_register_variable(char *var, char *strval, size_t val_len, zval *track_vars_array, bool override_protection); /* The longest property name we use in an uploaded file array */ #define MAX_SIZE_OF_INDEX sizeof("[tmp_name]") @@ -148,14 +148,14 @@ static void add_protected_variable(char *varname) /* {{{ */ } /* }}} */ -static zend_bool is_protected_variable(char *varname) /* {{{ */ +static bool is_protected_variable(char *varname) /* {{{ */ { normalize_protected_variable(varname); return zend_hash_str_exists(&PG(rfc1867_protected_variables), varname, strlen(varname)); } /* }}} */ -static void safe_php_register_variable(char *var, char *strval, size_t val_len, zval *track_vars_array, zend_bool override_protection) /* {{{ */ +static void safe_php_register_variable(char *var, char *strval, size_t val_len, zval *track_vars_array, bool override_protection) /* {{{ */ { if (override_protection || !is_protected_variable(var)) { php_register_variable_safe(var, strval, val_len, track_vars_array); @@ -163,7 +163,7 @@ static void safe_php_register_variable(char *var, char *strval, size_t val_len, } /* }}} */ -static void safe_php_register_variable_ex(char *var, zval *val, zval *track_vars_array, zend_bool override_protection) /* {{{ */ +static void safe_php_register_variable_ex(char *var, zval *val, zval *track_vars_array, bool override_protection) /* {{{ */ { if (override_protection || !is_protected_variable(var)) { php_register_variable_ex(var, val, track_vars_array); @@ -171,13 +171,13 @@ static void safe_php_register_variable_ex(char *var, zval *val, zval *track_vars } /* }}} */ -static void register_http_post_files_variable(char *strvar, char *val, zval *http_post_files, zend_bool override_protection) /* {{{ */ +static void register_http_post_files_variable(char *strvar, char *val, zval *http_post_files, bool override_protection) /* {{{ */ { safe_php_register_variable(strvar, val, strlen(val), http_post_files, override_protection); } /* }}} */ -static void register_http_post_files_variable_ex(char *var, zval *val, zval *http_post_files, zend_bool override_protection) /* {{{ */ +static void register_http_post_files_variable_ex(char *var, zval *val, zval *http_post_files, bool override_protection) /* {{{ */ { safe_php_register_variable_ex(var, val, http_post_files, override_protection); } diff --git a/main/spprintf.c b/main/spprintf.c index 768a27470c..980294ea23 100644 --- a/main/spprintf.c +++ b/main/spprintf.c @@ -185,7 +185,7 @@ static size_t strnlen(const char *s, size_t maxlen) { /* * Do format conversion placing the output in buffer */ -static void xbuf_format_converter(void *xbuf, zend_bool is_char, const char *fmt, va_list ap) /* {{{ */ +static void xbuf_format_converter(void *xbuf, bool is_char, const char *fmt, va_list ap) /* {{{ */ { char *s = NULL; size_t s_len; diff --git a/main/streams/userspace.c b/main/streams/userspace.c index 0e9059a99e..d9e864594c 100644 --- a/main/streams/userspace.c +++ b/main/streams/userspace.c @@ -310,7 +310,7 @@ static php_stream *user_wrapper_opener(php_stream_wrapper *wrapper, const char * zval args[4]; int call_result; php_stream *stream = NULL; - zend_bool old_in_user_include; + bool old_in_user_include; /* Try to catch bad usage without preventing flexibility */ if (FG(user_stream_current_filename) != NULL && strcmp(filename, FG(user_stream_current_filename)) == 0) { diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index 34dc4f2037..e3ff3fe2ec 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -816,7 +816,7 @@ static inline int php_tcp_sockop_accept(php_stream *stream, php_netstream_data_t php_stream_xport_param *xparam STREAMS_DC) { int clisock; - zend_bool nodelay = 0; + bool nodelay = 0; zval *tmpzval = NULL; xparam->outputs.client = NULL; diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c index 0079ac7fea..a68c313ad6 100644 --- a/sapi/apache2handler/apache_config.c +++ b/sapi/apache2handler/apache_config.c @@ -119,7 +119,7 @@ static const char *php_apache_phpini_set(cmd_parms *cmd, void *mconfig, const ch return NULL; } -static zend_bool should_overwrite_per_dir_entry(HashTable *target_ht, zval *zv, zend_hash_key *hash_key, void *pData) +static bool should_overwrite_per_dir_entry(HashTable *target_ht, zval *zv, zend_hash_key *hash_key, void *pData) { php_dir_entry *new_per_dir_entry = Z_PTR_P(zv); php_dir_entry *orig_per_dir_entry; diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h index d6c67c8a8d..54b531ed85 100644 --- a/sapi/apache2handler/php_apache.h +++ b/sapi/apache2handler/php_apache.h @@ -68,9 +68,9 @@ void php_ap2_register_hook(apr_pool_t *p); #define APR_ARRAY_FOREACH_CLOSE() }} typedef struct { - zend_bool engine; - zend_bool xbithack; - zend_bool last_modified; + bool engine; + bool xbithack; + bool last_modified; } php_apache2_info_struct; extern zend_module_entry apache2_module_entry; diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c index e7d29450ee..0eada1576d 100644 --- a/sapi/apache2handler/php_functions.c +++ b/sapi/apache2handler/php_functions.c @@ -253,7 +253,7 @@ PHP_FUNCTION(apache_setenv) php_struct *ctx; char *variable=NULL, *string_val=NULL; size_t variable_len, string_val_len; - zend_bool walk_to_top = 0; + bool walk_to_top = 0; int arg_count = ZEND_NUM_ARGS(); request_rec *r; @@ -287,7 +287,7 @@ PHP_FUNCTION(apache_getenv) php_struct *ctx; char *variable; size_t variable_len; - zend_bool walk_to_top = 0; + bool walk_to_top = 0; int arg_count = ZEND_NUM_ARGS(); char *env_val=NULL; request_rec *r; diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index d1d538345f..acde8c22cb 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -162,15 +162,15 @@ static const opt_struct OPTIONS[] = { typedef struct _php_cgi_globals_struct { HashTable user_config_cache; char *redirect_status_env; - zend_bool rfc2616_headers; - zend_bool nph; - zend_bool check_shebang_line; - zend_bool fix_pathinfo; - zend_bool force_redirect; - zend_bool discard_path; - zend_bool fcgi_logging; + bool rfc2616_headers; + bool nph; + bool check_shebang_line; + bool fix_pathinfo; + bool force_redirect; + bool discard_path; + bool fcgi_logging; #ifdef PHP_WIN32 - zend_bool impersonate; + bool impersonate; #endif } php_cgi_globals_struct; @@ -368,7 +368,7 @@ static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers) { sapi_header_struct *h; zend_llist_position pos; - zend_bool ignore_status = 0; + bool ignore_status = 0; int response_status = SG(sapi_headers).http_response_code; if (SG(request_info).no_headers == 1) { @@ -378,7 +378,7 @@ static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers) if (CGIG(nph) || SG(sapi_headers).http_response_code != 200) { int len; - zend_bool has_status = 0; + bool has_status = 0; char buf[SAPI_CGI_MAX_HEADER_LENGTH]; if (CGIG(rfc2616_headers) && SG(sapi_headers).http_status_line) { diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 9d296acec6..2cabbf961d 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -532,7 +532,7 @@ static void php_cli_usage(char *argv0) static php_stream *s_in_process = NULL; -static void cli_register_file_handles(zend_bool no_close) /* {{{ */ +static void cli_register_file_handles(bool no_close) /* {{{ */ { php_stream *s_in, *s_out, *s_err; php_stream_context *sc_in=NULL, *sc_out=NULL, *sc_err=NULL; diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 636e1de122..49601c0742 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -1174,7 +1174,7 @@ static void php_cli_server_log_response(php_cli_server_client *client, int statu { int color = 0, effective_status = status; char *basic_buf, *message_buf = "", *error_buf = ""; - zend_bool append_error_message = 0; + bool append_error_message = 0; if (PG(last_error_message)) { if (PG(last_error_type) & E_FATAL_ERRORS) { @@ -2744,7 +2744,7 @@ int do_cli_server(int argc, char **argv) /* {{{ */ sapi_module.phpinfo_as_text = 0; { - zend_bool ipv6 = strchr(server.host, ':'); + bool ipv6 = strchr(server.host, ':'); php_cli_server_logf( PHP_CLI_SERVER_LOG_PROCESS, "PHP %s Development Server (http://%s%s%s:%d) started", diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index c849a35980..ad05f865eb 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -142,12 +142,12 @@ static const opt_struct OPTIONS[] = { }; typedef struct _php_cgi_globals_struct { - zend_bool rfc2616_headers; - zend_bool nph; - zend_bool fix_pathinfo; - zend_bool force_redirect; - zend_bool discard_path; - zend_bool fcgi_logging; + bool rfc2616_headers; + bool nph; + bool fix_pathinfo; + bool force_redirect; + bool discard_path; + bool fcgi_logging; char *redirect_status_env; HashTable user_config_cache; char *error_header; @@ -309,7 +309,7 @@ static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers) /* {{{ */ char buf[SAPI_CGI_MAX_HEADER_LENGTH]; sapi_header_struct *h; zend_llist_position pos; - zend_bool ignore_status = 0; + bool ignore_status = 0; int response_status = SG(sapi_headers).http_response_code; if (SG(request_info).no_headers == 1) { @@ -319,7 +319,7 @@ static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers) /* {{{ */ if (CGIG(nph) || SG(sapi_headers).http_response_code != 200) { int len; - zend_bool has_status = 0; + bool has_status = 0; if (CGIG(rfc2616_headers) && SG(sapi_headers).http_status_line) { char *s; @@ -1533,7 +1533,7 @@ int main(int argc, char *argv[]) int php_allow_to_run_as_root = 0; int ret; #if ZEND_RC_DEBUG - zend_bool old_rc_debug; + bool old_rc_debug; #endif #if defined(SIGPIPE) && defined(SIG_IGN) diff --git a/sapi/fuzzer/fuzzer-sapi.c b/sapi/fuzzer/fuzzer-sapi.c index fd429f503e..f4c21f7f1c 100644 --- a/sapi/fuzzer/fuzzer-sapi.c +++ b/sapi/fuzzer/fuzzer-sapi.c @@ -230,7 +230,7 @@ int fuzzer_shutdown_php() } int fuzzer_do_request_from_buffer( - char *filename, const char *data, size_t data_len, zend_bool execute) + char *filename, const char *data, size_t data_len, bool execute) { int retval = FAILURE; /* failure by default */ diff --git a/sapi/fuzzer/fuzzer-sapi.h b/sapi/fuzzer/fuzzer-sapi.h index 4eb050e357..15633c6d10 100644 --- a/sapi/fuzzer/fuzzer-sapi.h +++ b/sapi/fuzzer/fuzzer-sapi.h @@ -22,4 +22,4 @@ void fuzzer_setup_dummy_frame(void); void fuzzer_call_php_func(const char *func_name, int nargs, char **params); void fuzzer_call_php_func_zval(const char *func_name, int nargs, zval *args); int fuzzer_do_request_from_buffer( - char *filename, const char *data, size_t data_len, zend_bool execute); + char *filename, const char *data, size_t data_len, bool execute); diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c index 24703ef75c..f8c5bfd73e 100644 --- a/sapi/litespeed/lsapi_main.c +++ b/sapi/litespeed/lsapi_main.c @@ -367,7 +367,7 @@ static int sapi_lsapi_send_headers_like_cgi(sapi_headers_struct *sapi_headers) char buf[SAPI_LSAPI_MAX_HEADER_LENGTH]; sapi_header_struct *h; zend_llist_position pos; - zend_bool ignore_status = 0; + bool ignore_status = 0; int response_status = SG(sapi_headers).http_response_code; if (SG(request_info).no_headers == 1) { @@ -378,7 +378,7 @@ static int sapi_lsapi_send_headers_like_cgi(sapi_headers_struct *sapi_headers) if (SG(sapi_headers).http_response_code != 200) { int len; - zend_bool has_status = 0; + bool has_status = 0; char *s; diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index efd2270601..933f5b423e 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -74,9 +74,9 @@ PHP_INI_BEGIN() STD_PHP_INI_ENTRY("phpdbg.eol", "2", PHP_INI_ALL, OnUpdateEol, eol, zend_phpdbg_globals, phpdbg_globals) PHP_INI_END() -static zend_bool phpdbg_booted = 0; -static zend_bool phpdbg_fully_started = 0; -zend_bool use_mm_wrappers = 1; +static bool phpdbg_booted = 0; +static bool phpdbg_fully_started = 0; +bool use_mm_wrappers = 1; static void php_phpdbg_destroy_bp_file(zval *brake) /* {{{ */ { @@ -312,7 +312,7 @@ PHP_FUNCTION(phpdbg_exec) { zend_stat_t sb; - zend_bool result = 1; + bool result = 1; if (VCWD_STAT(ZSTR_VAL(exec), &sb) != FAILURE) { if (sb.st_mode & (S_IFREG|S_IFLNK)) { @@ -476,7 +476,7 @@ PHP_FUNCTION(phpdbg_start_oplog) PHPDBG_G(oplog_cur)->next = NULL; } -static zend_always_inline zend_bool phpdbg_is_ignored_opcode(zend_uchar opcode) { +static zend_always_inline bool phpdbg_is_ignored_opcode(zend_uchar opcode) { return opcode == ZEND_NOP || opcode == ZEND_OP_DATA || opcode == ZEND_FE_FREE || opcode == ZEND_FREE || opcode == ZEND_ASSERT_CHECK || opcode == ZEND_VERIFY_RETURN_TYPE || opcode == ZEND_DECLARE_CONST || opcode == ZEND_DECLARE_CLASS || opcode == ZEND_DECLARE_FUNCTION @@ -487,7 +487,7 @@ static zend_always_inline zend_bool phpdbg_is_ignored_opcode(zend_uchar opcode) ; } -static void phpdbg_oplog_fill_executable(zend_op_array *op_array, HashTable *insert_ht, zend_bool by_opcode) { +static void phpdbg_oplog_fill_executable(zend_op_array *op_array, HashTable *insert_ht, bool by_opcode) { /* ignore RECV_* opcodes */ zend_op *cur = op_array->opcodes + op_array->num_args + !!(op_array->fn_flags & ZEND_ACC_VARIADIC); zend_op *end = op_array->opcodes + op_array->last; @@ -538,8 +538,8 @@ PHP_FUNCTION(phpdbg_get_executable) { HashTable *options = NULL; zval *option_buffer; - zend_bool by_function = 0; - zend_bool by_opcode = 0; + bool by_function = 0; + bool by_opcode = 0; HashTable *insert_ht; zend_function *func; @@ -639,8 +639,8 @@ PHP_FUNCTION(phpdbg_end_oplog) HashTable *options = NULL; zval *option_buffer; - zend_bool by_function = 0; - zend_bool by_opcode = 0; + bool by_function = 0; + bool by_opcode = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|H", &options) == FAILURE) { RETURN_THROWS(); @@ -1056,7 +1056,7 @@ const char phpdbg_ini_hardcoded[] = "error_log=\n" "output_buffering=off\n\0"; -static void phpdbg_welcome(zend_bool cleaning) /* {{{ */ +static void phpdbg_welcome(bool cleaning) /* {{{ */ { /* print blurb */ if (!cleaning) { @@ -1300,21 +1300,21 @@ int main(int argc, char **argv) /* {{{ */ int ini_entries_len; char **zend_extensions = NULL; zend_ulong zend_extensions_len = 0L; - zend_bool ini_ignore; + bool ini_ignore; char *ini_override; char *exec = NULL; char *first_command = NULL; char *init_file; size_t init_file_len; - zend_bool init_file_default; + bool init_file_default; char *oplog_file; size_t oplog_file_len; uint64_t flags; char *php_optarg; int php_optind, opt, show_banner = 1; long cleaning = -1; - volatile zend_bool quit_immediately = 0; /* somehow some gcc release builds will play a bit around with order in combination with setjmp..., hence volatile */ - zend_bool remote = 0; + volatile bool quit_immediately = 0; /* somehow some gcc release builds will play a bit around with order in combination with setjmp..., hence volatile */ + bool remote = 0; zend_phpdbg_globals *settings = NULL; char *bp_tmp = NULL; char *address; @@ -1323,12 +1323,12 @@ int main(int argc, char **argv) /* {{{ */ int socket = -1; FILE* stream = NULL; char *print_opline_func; - zend_bool ext_stmt = 0; - zend_bool is_exit; + bool ext_stmt = 0; + bool is_exit; int exit_status; char *read_from_stdin = NULL; zend_string *backup_phpdbg_compile = NULL; - zend_bool show_help = 0, show_version = 0; + bool show_help = 0, show_version = 0; void* (*_malloc)(size_t); void (*_free)(void*); void* (*_realloc)(void*, size_t); diff --git a/sapi/phpdbg/phpdbg.h b/sapi/phpdbg/phpdbg.h index e5db725336..4dcfc3d195 100644 --- a/sapi/phpdbg/phpdbg.h +++ b/sapi/phpdbg/phpdbg.h @@ -260,7 +260,7 @@ ZEND_BEGIN_MODULE_GLOBALS(phpdbg) HashTable watch_free; /* pointers to watch for being freed */ HashTable *watchlist_mem; /* triggered watchpoints */ HashTable *watchlist_mem_backup; /* triggered watchpoints backup table while iterating over it */ - zend_bool watchpoint_hit; /* a watchpoint was hit */ + bool watchpoint_hit; /* a watchpoint was hit */ void (*original_free_function)(void *); /* the original AG(mm_heap)->_free function */ phpdbg_watch_element *watch_tmp; /* temporary pointer for a watch element */ @@ -270,8 +270,8 @@ ZEND_BEGIN_MODULE_GLOBALS(phpdbg) zval retval; /* return value */ int bp_count; /* breakpoint count */ int vmret; /* return from last opcode handler execution */ - zend_bool in_execution; /* in execution? */ - zend_bool unclean_eval; /* do not check for memory leaks when we needed to bail out during eval */ + bool in_execution; /* in execution? */ + bool unclean_eval; /* do not check for memory leaks when we needed to bail out during eval */ zend_op_array *(*compile_file)(zend_file_handle *file_handle, int type); zend_op_array *(*init_compile_file)(zend_file_handle *file_handle, int type); @@ -291,7 +291,7 @@ ZEND_BEGIN_MODULE_GLOBALS(phpdbg) ssize_t (*php_stdiop_write)(php_stream *, const char *, size_t); int in_script_xml; /* in <stream> output mode */ struct { - zend_bool active; + bool active; int type; int fd; char *tag; @@ -305,7 +305,7 @@ ZEND_BEGIN_MODULE_GLOBALS(phpdbg) char *prompt[2]; /* prompt */ const phpdbg_color_t *colors[PHPDBG_COLORS]; /* colors */ char *buffer; /* buffer */ - zend_bool last_was_newline; /* check if we don't need to output a newline upon next phpdbg_error or phpdbg_notice */ + bool last_was_newline; /* check if we don't need to output a newline upon next phpdbg_error or phpdbg_notice */ FILE *stdin_file; /* FILE pointer to stdin source file */ const php_stream_wrapper *orig_url_wrap_php; diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c index db3d1cf0c4..f026bfbcdd 100644 --- a/sapi/phpdbg/phpdbg_bp.c +++ b/sapi/phpdbg/phpdbg_bp.c @@ -259,7 +259,7 @@ PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, size_t path_len, lo php_stream_statbuf ssb; char realpath[MAXPATHLEN]; const char *original_path = path; - zend_bool pending = 0; + bool pending = 0; zend_string *path_str; HashTable *broken, *file_breaks = &PHPDBG_G(bp)[PHPDBG_BREAK_FILE]; @@ -1019,7 +1019,7 @@ static inline phpdbg_breakbase_t *phpdbg_find_breakpoint_opcode(zend_uchar opcod return zend_hash_index_find_ptr(&PHPDBG_G(bp)[PHPDBG_BREAK_OPCODE], zend_hash_func(opname, strlen(opname))); } /* }}} */ -static inline zend_bool phpdbg_find_breakpoint_param(phpdbg_param_t *param, zend_execute_data *execute_data) /* {{{ */ +static inline bool phpdbg_find_breakpoint_param(phpdbg_param_t *param, zend_execute_data *execute_data) /* {{{ */ { zend_function *function = execute_data->func; @@ -1269,7 +1269,7 @@ PHPDBG_API void phpdbg_clear_breakpoints(void) /* {{{ */ PHPDBG_G(bp_count) = 0; } /* }}} */ -PHPDBG_API void phpdbg_hit_breakpoint(phpdbg_breakbase_t *brake, zend_bool output) /* {{{ */ +PHPDBG_API void phpdbg_hit_breakpoint(phpdbg_breakbase_t *brake, bool output) /* {{{ */ { brake->hits++; diff --git a/sapi/phpdbg/phpdbg_bp.h b/sapi/phpdbg/phpdbg_bp.h index 87c5388c94..374ee8e711 100644 --- a/sapi/phpdbg/phpdbg_bp.h +++ b/sapi/phpdbg/phpdbg_bp.h @@ -41,7 +41,7 @@ typedef struct _zend_op *phpdbg_opline_ptr_t; /* }}} */ int id; \ zend_uchar type; \ zend_ulong hits; \ - zend_bool disabled; \ + bool disabled; \ const char *name /* }}} */ /* {{{ breakpoint base */ @@ -109,7 +109,7 @@ typedef struct _phpdbg_breakop_t { typedef struct _phpdbg_breakcond_t { phpdbg_breakbase(code); size_t code_len; - zend_bool paramed; + bool paramed; phpdbg_param_t param; zend_ulong hash; zend_op_array *ops; @@ -139,7 +139,7 @@ PHPDBG_API void phpdbg_set_breakpoint_at(const phpdbg_param_t *param); /* }}} */ PHPDBG_API phpdbg_breakbase_t* phpdbg_find_breakpoint(zend_execute_data*); /* }}} */ /* {{{ Misc Breakpoint API */ -PHPDBG_API void phpdbg_hit_breakpoint(phpdbg_breakbase_t* brake, zend_bool output); +PHPDBG_API void phpdbg_hit_breakpoint(phpdbg_breakbase_t* brake, bool output); PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type); PHPDBG_API void phpdbg_print_breakpoint(phpdbg_breakbase_t* brake); PHPDBG_API void phpdbg_reset_breakpoints(void); diff --git a/sapi/phpdbg/phpdbg_btree.c b/sapi/phpdbg/phpdbg_btree.c index 4bd9787556..4b039e3e08 100644 --- a/sapi/phpdbg/phpdbg_btree.c +++ b/sapi/phpdbg/phpdbg_btree.c @@ -224,10 +224,10 @@ check_branch_existence: return SUCCESS; } -void phpdbg_btree_clean_recursive(phpdbg_btree_branch *branch, zend_ulong depth, zend_bool persistent) { +void phpdbg_btree_clean_recursive(phpdbg_btree_branch *branch, zend_ulong depth, bool persistent) { phpdbg_btree_branch *start = branch; while (depth--) { - zend_bool use_branch = branch + 1 == branch->branches[0]; + bool use_branch = branch + 1 == branch->branches[0]; if (branch->branches[use_branch]) { phpdbg_btree_clean_recursive(branch->branches[use_branch], depth, persistent); } diff --git a/sapi/phpdbg/phpdbg_btree.h b/sapi/phpdbg/phpdbg_btree.h index bb0a4ef3fb..54bc42a079 100644 --- a/sapi/phpdbg/phpdbg_btree.h +++ b/sapi/phpdbg/phpdbg_btree.h @@ -35,7 +35,7 @@ union _phpdbg_btree_branch { typedef struct { zend_ulong count; zend_ulong depth; - zend_bool persistent; + bool persistent; phpdbg_btree_branch *branch; } phpdbg_btree; diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c index 757d48e739..c462c14025 100644 --- a/sapi/phpdbg/phpdbg_cmd.c +++ b/sapi/phpdbg/phpdbg_cmd.c @@ -244,7 +244,7 @@ PHPDBG_API zend_ulong phpdbg_hash_param(const phpdbg_param_t *param) /* {{{ */ return hash; } /* }}} */ -PHPDBG_API zend_bool phpdbg_match_param(const phpdbg_param_t *l, const phpdbg_param_t *r) /* {{{ */ +PHPDBG_API bool phpdbg_match_param(const phpdbg_param_t *l, const phpdbg_param_t *r) /* {{{ */ { if (l && r) { if (l->type == r->type) { @@ -471,7 +471,7 @@ PHPDBG_API int phpdbg_stack_verify(const phpdbg_command_t *command, phpdbg_param size_t least = 0L, received = 0L, current = 0L; - zend_bool optional = 0; + bool optional = 0; /* check for arg spec */ if (!(arg) || !(*arg)) { @@ -659,7 +659,7 @@ PHPDBG_API const phpdbg_command_t *phpdbg_stack_resolve(const phpdbg_command_t * return NULL; } /* }}} */ -static int phpdbg_internal_stack_execute(phpdbg_param_t *stack, zend_bool allow_async_unsafe) { +static int phpdbg_internal_stack_execute(phpdbg_param_t *stack, bool allow_async_unsafe) { const phpdbg_command_t *handler = NULL; phpdbg_param_t *top = (phpdbg_param_t *) stack->next; @@ -712,7 +712,7 @@ static int phpdbg_internal_stack_execute(phpdbg_param_t *stack, zend_bool allow_ } /* }}} */ /* {{{ */ -PHPDBG_API int phpdbg_stack_execute(phpdbg_param_t *stack, zend_bool allow_async_unsafe) { +PHPDBG_API int phpdbg_stack_execute(phpdbg_param_t *stack, bool allow_async_unsafe) { phpdbg_param_t *top = stack; if (stack->type != STACK_PARAM) { diff --git a/sapi/phpdbg/phpdbg_cmd.h b/sapi/phpdbg/phpdbg_cmd.h index 3cc07d1a70..ec927424c6 100644 --- a/sapi/phpdbg/phpdbg_cmd.h +++ b/sapi/phpdbg/phpdbg_cmd.h @@ -96,7 +96,7 @@ struct _phpdbg_command_t { const phpdbg_command_t *subs; /* Sub Commands */ char *args; /* Argument Spec */ const phpdbg_command_t *parent; /* Parent Command */ - zend_bool flags; /* General flags */ + bool flags; /* General flags */ }; /* }}} */ @@ -136,7 +136,7 @@ PHPDBG_API void phpdbg_stack_push(phpdbg_param_t *stack, phpdbg_param_t *param); PHPDBG_API void phpdbg_stack_separate(phpdbg_param_t *param); PHPDBG_API const phpdbg_command_t *phpdbg_stack_resolve(const phpdbg_command_t *commands, const phpdbg_command_t *parent, phpdbg_param_t **top); PHPDBG_API int phpdbg_stack_verify(const phpdbg_command_t *command, phpdbg_param_t **stack); -PHPDBG_API int phpdbg_stack_execute(phpdbg_param_t *stack, zend_bool allow_async_unsafe); +PHPDBG_API int phpdbg_stack_execute(phpdbg_param_t *stack, bool allow_async_unsafe); PHPDBG_API void phpdbg_stack_free(phpdbg_param_t *stack); /* @@ -144,7 +144,7 @@ PHPDBG_API void phpdbg_stack_free(phpdbg_param_t *stack); */ PHPDBG_API void phpdbg_clear_param(phpdbg_param_t*); PHPDBG_API void phpdbg_copy_param(const phpdbg_param_t*, phpdbg_param_t*); -PHPDBG_API zend_bool phpdbg_match_param(const phpdbg_param_t *, const phpdbg_param_t *); +PHPDBG_API bool phpdbg_match_param(const phpdbg_param_t *, const phpdbg_param_t *); PHPDBG_API zend_ulong phpdbg_hash_param(const phpdbg_param_t *); PHPDBG_API const char* phpdbg_get_param_type(const phpdbg_param_t*); PHPDBG_API char* phpdbg_param_tostring(const phpdbg_param_t *param, char **pointer); diff --git a/sapi/phpdbg/phpdbg_frame.c b/sapi/phpdbg/phpdbg_frame.c index 453a0d74ba..0dbabce67a 100644 --- a/sapi/phpdbg/phpdbg_frame.c +++ b/sapi/phpdbg/phpdbg_frame.c @@ -200,7 +200,7 @@ static void phpdbg_dump_prototype(zval *tmp) /* {{{ */ if (args) { const zend_function *func = NULL; const zend_arg_info *arginfo = NULL; - zend_bool is_variadic = 0; + bool is_variadic = 0; int j = 0, m; phpdbg_try_access { diff --git a/sapi/phpdbg/phpdbg_help.c b/sapi/phpdbg/phpdbg_help.c index e8a02de444..695774d906 100644 --- a/sapi/phpdbg/phpdbg_help.c +++ b/sapi/phpdbg/phpdbg_help.c @@ -27,7 +27,7 @@ ZEND_EXTERN_MODULE_GLOBALS(phpdbg) /* {{{ Commands Table */ #define PHPDBG_COMMAND_HELP_D(name, tip, alias, action) \ - {PHPDBG_STRL(#name), tip, sizeof(tip)-1, alias, action, &phpdbg_prompt_commands[16], 0, NULL, (zend_bool) 0} + {PHPDBG_STRL(#name), tip, sizeof(tip)-1, alias, action, &phpdbg_prompt_commands[16], 0, NULL, (bool) 0} const phpdbg_command_t phpdbg_help_commands[] = { PHPDBG_COMMAND_HELP_D(aliases, "show alias list", 'a', phpdbg_do_help_aliases), diff --git a/sapi/phpdbg/phpdbg_info.c b/sapi/phpdbg/phpdbg_info.c index 783681009e..b5dc4fa492 100644 --- a/sapi/phpdbg/phpdbg_info.c +++ b/sapi/phpdbg/phpdbg_info.c @@ -171,7 +171,7 @@ static int phpdbg_arm_auto_global(zval *ptrzv) { return 0; } -static int phpdbg_print_symbols(zend_bool show_globals) { +static int phpdbg_print_symbols(bool show_globals) { HashTable vars; zend_array *symtable; zend_string *var; @@ -304,7 +304,7 @@ PHPDBG_INFO(globals) /* {{{ */ PHPDBG_INFO(literal) /* {{{ */ { /* literals are assumed to not be manipulated during executing of their op_array and as such async safe */ - zend_bool in_executor = PHPDBG_G(in_execution) && EG(current_execute_data) && EG(current_execute_data)->func; + bool in_executor = PHPDBG_G(in_execution) && EG(current_execute_data) && EG(current_execute_data)->func; if (in_executor || PHPDBG_G(ops)) { zend_op_array *ops = in_executor ? &EG(current_execute_data)->func->op_array : PHPDBG_G(ops); int literal = 0, count = ops->last_literal - 1; @@ -342,7 +342,7 @@ PHPDBG_INFO(memory) /* {{{ */ { size_t used, real, peak_used, peak_real; zend_mm_heap *orig_heap = NULL; - zend_bool is_mm; + bool is_mm; if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) { orig_heap = zend_mm_set_heap(phpdbg_original_heap_sigsafe_mem()); diff --git a/sapi/phpdbg/phpdbg_opcode.c b/sapi/phpdbg/phpdbg_opcode.c index 4c0c2fbf7a..8dd0c5209d 100644 --- a/sapi/phpdbg/phpdbg_opcode.c +++ b/sapi/phpdbg/phpdbg_opcode.c @@ -141,7 +141,7 @@ char *phpdbg_decode_opline(zend_op_array *ops, zend_op *opline) /*{{{ */ return result; } /* }}} */ -void phpdbg_print_opline_ex(zend_execute_data *execute_data, zend_bool ignore_flags) /* {{{ */ +void phpdbg_print_opline_ex(zend_execute_data *execute_data, bool ignore_flags) /* {{{ */ { /* force out a line while stepping so the user knows what is happening */ if (ignore_flags || @@ -186,7 +186,7 @@ void phpdbg_print_opline_ex(zend_execute_data *execute_data, zend_bool ignore_fl } } /* }}} */ -void phpdbg_print_opline(zend_execute_data *execute_data, zend_bool ignore_flags) /* {{{ */ +void phpdbg_print_opline(zend_execute_data *execute_data, bool ignore_flags) /* {{{ */ { phpdbg_print_opline_ex(execute_data, ignore_flags); } /* }}} */ diff --git a/sapi/phpdbg/phpdbg_opcode.h b/sapi/phpdbg/phpdbg_opcode.h index 68bdddf0b1..40d8e52d8c 100644 --- a/sapi/phpdbg/phpdbg_opcode.h +++ b/sapi/phpdbg/phpdbg_opcode.h @@ -22,8 +22,8 @@ #include "zend_types.h" char *phpdbg_decode_opline(zend_op_array *ops, zend_op *op); -void phpdbg_print_opline(zend_execute_data *execute_data, zend_bool ignore_flags); -void phpdbg_print_opline_ex(zend_execute_data *execute_data, zend_bool ignore_flags); +void phpdbg_print_opline(zend_execute_data *execute_data, bool ignore_flags); +void phpdbg_print_opline_ex(zend_execute_data *execute_data, bool ignore_flags); typedef struct _phpdbg_oplog_entry phpdbg_oplog_entry; struct _phpdbg_oplog_entry { diff --git a/sapi/phpdbg/phpdbg_out.c b/sapi/phpdbg/phpdbg_out.c index 30dadfc11c..581ec0ca4e 100644 --- a/sapi/phpdbg/phpdbg_out.c +++ b/sapi/phpdbg/phpdbg_out.c @@ -122,7 +122,7 @@ typedef struct buf_area buffy; /* * Do format conversion placing the output in buffer */ -static int format_converter(register buffy *odp, const char *fmt, zend_bool escape_xml, va_list ap) { +static int format_converter(register buffy *odp, const char *fmt, bool escape_xml, va_list ap) { char *sp; char *bep; int cc = 0; @@ -130,7 +130,7 @@ static int format_converter(register buffy *odp, const char *fmt, zend_bool esca char *s = NULL, *free_s = NULL; size_t s_len; - zend_bool free_zcopy; + bool free_zcopy; zval *zvp, zcopy; int min_width = 0; @@ -803,7 +803,7 @@ skip_output: return (cc); } -static void strx_printv(int *ccp, char *buf, size_t len, const char *format, zend_bool escape_xml, va_list ap) { +static void strx_printv(int *ccp, char *buf, size_t len, const char *format, bool escape_xml, va_list ap) { buffy od; int cc; @@ -832,14 +832,14 @@ static void strx_printv(int *ccp, char *buf, size_t len, const char *format, zen } } -static int phpdbg_xml_vsnprintf(char *buf, size_t len, const char *format, zend_bool escape_xml, va_list ap) { +static int phpdbg_xml_vsnprintf(char *buf, size_t len, const char *format, bool escape_xml, va_list ap) { int cc; strx_printv(&cc, buf, len, format, escape_xml, ap); return (cc); } -PHPDBG_API int phpdbg_xml_vasprintf(char **buf, const char *format, zend_bool escape_xml, va_list ap) { +PHPDBG_API int phpdbg_xml_vasprintf(char **buf, const char *format, bool escape_xml, va_list ap) { va_list ap2; int cc; @@ -1137,7 +1137,7 @@ PHPDBG_API void phpdbg_free_err_buf(void) { } } -PHPDBG_API void phpdbg_activate_err_buf(zend_bool active) { +PHPDBG_API void phpdbg_activate_err_buf(bool active) { PHPDBG_G(err_buf).active = active; } diff --git a/sapi/phpdbg/phpdbg_out.h b/sapi/phpdbg/phpdbg_out.h index 19e2b3766d..bd5ec98c70 100644 --- a/sapi/phpdbg/phpdbg_out.h +++ b/sapi/phpdbg/phpdbg_out.h @@ -76,7 +76,7 @@ PHPDBG_API int _phpdbg_asprintf(char **buf, const char *format, ...); #endif PHPDBG_API void phpdbg_free_err_buf(void); -PHPDBG_API void phpdbg_activate_err_buf(zend_bool active); +PHPDBG_API void phpdbg_activate_err_buf(bool active); PHPDBG_API int phpdbg_output_err_buf(const char *tag, const char *xmlfmt, const char *strfmt, ...); diff --git a/sapi/phpdbg/phpdbg_print.c b/sapi/phpdbg/phpdbg_print.c index df925b6402..e3bbb9fed8 100644 --- a/sapi/phpdbg/phpdbg_print.c +++ b/sapi/phpdbg/phpdbg_print.c @@ -320,7 +320,7 @@ void phpdbg_print_opcodes_method(const char *class, const char *function) { static void phpdbg_print_opcodes_ce(zend_class_entry *ce) { zend_function *method; zend_string *method_name; - zend_bool first = 1; + bool first = 1; phpdbg_out("%s %s: %s\n", (ce->type == ZEND_USER_CLASS) ? diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 58a54a5a55..e720b7ad62 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -207,7 +207,7 @@ static inline int phpdbg_call_register(phpdbg_param_t *stack) /* {{{ */ struct phpdbg_init_state { int line; - zend_bool in_code; + bool in_code; char *code; size_t code_len; const char *init_file; @@ -309,7 +309,7 @@ void phpdbg_string_init(char *buffer) { } } -void phpdbg_try_file_init(char *init_file, size_t init_file_len, zend_bool free_init) /* {{{ */ +void phpdbg_try_file_init(char *init_file, size_t init_file_len, bool free_init) /* {{{ */ { zend_stat_t sb; @@ -340,7 +340,7 @@ void phpdbg_try_file_init(char *init_file, size_t init_file_len, zend_bool free_ } } /* }}} */ -void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default) /* {{{ */ +void phpdbg_init(char *init_file, size_t init_file_len, bool use_default) /* {{{ */ { if (init_file) { phpdbg_try_file_init(init_file, init_file_len, 1); @@ -382,7 +382,7 @@ void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default) / } /* }}} */ -void phpdbg_clean(zend_bool full, zend_bool resubmit) /* {{{ */ +void phpdbg_clean(bool full, bool resubmit) /* {{{ */ { /* this is implicitly required */ if (PHPDBG_G(ops)) { @@ -751,7 +751,7 @@ PHPDBG_COMMAND(run) /* {{{ */ { if (PHPDBG_G(ops) || PHPDBG_G(exec)) { zend_execute_data *ex = EG(current_execute_data); - zend_bool restore = 1; + bool restore = 1; if (PHPDBG_G(in_execution)) { if (phpdbg_ask_user_permission("Do you really want to restart execution?") == SUCCESS) { @@ -946,7 +946,7 @@ int phpdbg_output_ev_variable(char *name, size_t len, char *keyname, size_t keyl PHPDBG_COMMAND(ev) /* {{{ */ { - zend_bool stepping = ((PHPDBG_G(flags) & PHPDBG_IS_STEPPING) == PHPDBG_IS_STEPPING); + bool stepping = ((PHPDBG_G(flags) & PHPDBG_IS_STEPPING) == PHPDBG_IS_STEPPING); zval retval; zend_execute_data *original_execute_data = EG(current_execute_data); @@ -1546,7 +1546,7 @@ PHPDBG_COMMAND(watch) /* {{{ */ return SUCCESS; } /* }}} */ -int phpdbg_interactive(zend_bool allow_async_unsafe, char *input) /* {{{ */ +int phpdbg_interactive(bool allow_async_unsafe, char *input) /* {{{ */ { int ret = SUCCESS; phpdbg_param_t stack; @@ -1679,7 +1679,7 @@ static inline void list_code() { void phpdbg_execute_ex(zend_execute_data *execute_data) /* {{{ */ { - zend_bool original_in_execution = PHPDBG_G(in_execution); + bool original_in_execution = PHPDBG_G(in_execution); if ((PHPDBG_G(flags) & PHPDBG_IS_STOPPING) && !(PHPDBG_G(flags) & PHPDBG_IS_RUNNING)) { zend_bailout(); diff --git a/sapi/phpdbg/phpdbg_prompt.h b/sapi/phpdbg/phpdbg_prompt.h index 2c2c3d2047..e465effb1c 100644 --- a/sapi/phpdbg/phpdbg_prompt.h +++ b/sapi/phpdbg/phpdbg_prompt.h @@ -21,9 +21,9 @@ /* {{{ */ void phpdbg_string_init(char *buffer); -void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default); -void phpdbg_try_file_init(char *init_file, size_t init_file_len, zend_bool free_init); -int phpdbg_interactive(zend_bool allow_async_unsafe, char *input); +void phpdbg_init(char *init_file, size_t init_file_len, bool use_default); +void phpdbg_try_file_init(char *init_file, size_t init_file_len, bool free_init); +int phpdbg_interactive(bool allow_async_unsafe, char *input); int phpdbg_compile(void); int phpdbg_compile_stdin(zend_string *code); void phpdbg_force_interruption(void); diff --git a/sapi/phpdbg/phpdbg_sigsafe.c b/sapi/phpdbg/phpdbg_sigsafe.c index dab0d27d85..af9465a3ca 100644 --- a/sapi/phpdbg/phpdbg_sigsafe.c +++ b/sapi/phpdbg/phpdbg_sigsafe.c @@ -53,6 +53,6 @@ void phpdbg_clear_sigsafe_mem(void) { PHPDBG_G(sigsafe_mem).mem = NULL; } -zend_bool phpdbg_active_sigsafe_mem(void) { +bool phpdbg_active_sigsafe_mem(void) { return !!PHPDBG_G(sigsafe_mem).mem; } diff --git a/sapi/phpdbg/phpdbg_sigsafe.h b/sapi/phpdbg/phpdbg_sigsafe.h index ab689a38d8..7b7599e07e 100644 --- a/sapi/phpdbg/phpdbg_sigsafe.h +++ b/sapi/phpdbg/phpdbg_sigsafe.h @@ -7,14 +7,14 @@ typedef struct { char *mem; - zend_bool allocated; + bool allocated; zend_mm_heap *heap; zend_mm_heap *old_heap; } phpdbg_signal_safe_mem; #include "phpdbg.h" -zend_bool phpdbg_active_sigsafe_mem(void); +bool phpdbg_active_sigsafe_mem(void); void phpdbg_set_sigsafe_mem(char *mem); void phpdbg_clear_sigsafe_mem(void); diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c index 56fb654909..afe8f05632 100644 --- a/sapi/phpdbg/phpdbg_utils.c +++ b/sapi/phpdbg/phpdbg_utils.c @@ -424,13 +424,13 @@ static int phpdbg_parse_variable_arg_wrapper(char *name, size_t len, char *keyna return callback(name, len, keyname, keylen, parent, zv); } -PHPDBG_API int phpdbg_parse_variable(char *input, size_t len, HashTable *parent, size_t i, phpdbg_parse_var_func callback, zend_bool silent) { +PHPDBG_API int phpdbg_parse_variable(char *input, size_t len, HashTable *parent, size_t i, phpdbg_parse_var_func callback, bool silent) { return phpdbg_parse_variable_with_arg(input, len, parent, i, (phpdbg_parse_var_with_arg_func) phpdbg_parse_variable_arg_wrapper, NULL, silent, callback); } -PHPDBG_API int phpdbg_parse_variable_with_arg(char *input, size_t len, HashTable *parent, size_t i, phpdbg_parse_var_with_arg_func callback, phpdbg_parse_var_with_arg_func step_cb, zend_bool silent, void *arg) { +PHPDBG_API int phpdbg_parse_variable_with_arg(char *input, size_t len, HashTable *parent, size_t i, phpdbg_parse_var_with_arg_func callback, phpdbg_parse_var_with_arg_func step_cb, bool silent, void *arg) { int ret = FAILURE; - zend_bool new_index = 1; + bool new_index = 1; char *last_index = NULL; size_t index_len = 0; zval *zv; @@ -655,7 +655,7 @@ PHPDBG_API void phpdbg_xml_var_dump(zval *zv) { zend_ulong num; zval *val; int (*element_dump_func)(zval *zv, zend_string *key, zend_ulong num); - zend_bool is_ref = 0; + bool is_ref = 0; phpdbg_try_access { is_ref = Z_ISREF_P(zv) && GC_REFCOUNT(Z_COUNTED_P(zv)) > 1; @@ -731,7 +731,7 @@ head_done: } phpdbg_end_try_access(); } -PHPDBG_API zend_bool phpdbg_check_caught_ex(zend_execute_data *execute_data, zend_object *exception) { +PHPDBG_API bool phpdbg_check_caught_ex(zend_execute_data *execute_data, zend_object *exception) { const zend_op *op; zend_op *cur; uint32_t op_num, i; diff --git a/sapi/phpdbg/phpdbg_utils.h b/sapi/phpdbg/phpdbg_utils.h index 508bb89c80..40d54d1095 100644 --- a/sapi/phpdbg/phpdbg_utils.h +++ b/sapi/phpdbg/phpdbg_utils.h @@ -86,8 +86,8 @@ char *phpdbg_get_property_key(char *key); typedef int (*phpdbg_parse_var_func)(char *name, size_t len, char *keyname, size_t keylen, HashTable *parent, zval *zv); typedef int (*phpdbg_parse_var_with_arg_func)(char *name, size_t len, char *keyname, size_t keylen, HashTable *parent, zval *zv, void *arg); -PHPDBG_API int phpdbg_parse_variable(char *input, size_t len, HashTable *parent, size_t i, phpdbg_parse_var_func callback, zend_bool silent); -PHPDBG_API int phpdbg_parse_variable_with_arg(char *input, size_t len, HashTable *parent, size_t i, phpdbg_parse_var_with_arg_func callback, phpdbg_parse_var_with_arg_func step_cb, zend_bool silent, void *arg); +PHPDBG_API int phpdbg_parse_variable(char *input, size_t len, HashTable *parent, size_t i, phpdbg_parse_var_func callback, bool silent); +PHPDBG_API int phpdbg_parse_variable_with_arg(char *input, size_t len, HashTable *parent, size_t i, phpdbg_parse_var_with_arg_func callback, phpdbg_parse_var_with_arg_func step_cb, bool silent, void *arg); int phpdbg_is_auto_global(char *name, int len); @@ -95,7 +95,7 @@ PHPDBG_API void phpdbg_xml_var_dump(zval *zv); char *phpdbg_short_zval_print(zval *zv, int maxlen); -PHPDBG_API zend_bool phpdbg_check_caught_ex(zend_execute_data *ex, zend_object *exception); +PHPDBG_API bool phpdbg_check_caught_ex(zend_execute_data *ex, zend_object *exception); static zend_always_inline zend_execute_data *phpdbg_user_execute_data(zend_execute_data *ex) { while (!ex->func || !ZEND_USER_CODE(ex->func->common.type)) { diff --git a/sapi/phpdbg/phpdbg_watch.c b/sapi/phpdbg/phpdbg_watch.c index af8de17096..0968aadafa 100644 --- a/sapi/phpdbg/phpdbg_watch.c +++ b/sapi/phpdbg/phpdbg_watch.c @@ -127,7 +127,7 @@ const phpdbg_command_t phpdbg_watch_commands[] = { #define HT_WATCH_HT(watch) HT_PTR_HT((watch)->addr.ptr) /* ### PRINTING POINTER DIFFERENCES ### */ -zend_bool phpdbg_check_watch_diff(phpdbg_watchtype type, void *oldPtr, void *newPtr) { +bool phpdbg_check_watch_diff(phpdbg_watchtype type, void *oldPtr, void *newPtr) { switch (type) { case WATCH_ON_BUCKET: if (memcmp(&((Bucket *) oldPtr)->h, &((Bucket *) newPtr)->h, sizeof(Bucket) - sizeof(zval) /* key/val comparison */) != 0) { @@ -498,7 +498,7 @@ phpdbg_watch_element *phpdbg_add_ht_watch_element(zval *zv, phpdbg_watch_element return phpdbg_add_watch_element(&watch, element); } -zend_bool phpdbg_is_recursively_watched(void *ptr, phpdbg_watch_element *element) { +bool phpdbg_is_recursively_watched(void *ptr, phpdbg_watch_element *element) { phpdbg_watch_element *next = element; do { element = next; @@ -663,7 +663,7 @@ void phpdbg_queue_element_for_recreation(phpdbg_watch_element *element) { } } -zend_bool phpdbg_try_readding_watch_element(zval *parent, phpdbg_watch_element *element) { +bool phpdbg_try_readding_watch_element(zval *parent, phpdbg_watch_element *element) { zval *zv; HashTable *ht = HT_FROM_ZVP(parent); @@ -1262,7 +1262,7 @@ static int phpdbg_watchpoint_parse_wrapper(char *name, size_t namelen, char *key return ret; } -PHPDBG_API int phpdbg_watchpoint_parse_input(char *input, size_t len, HashTable *parent, size_t i, phpdbg_watch_parse_struct *info, zend_bool silent) { +PHPDBG_API int phpdbg_watchpoint_parse_input(char *input, size_t len, HashTable *parent, size_t i, phpdbg_watch_parse_struct *info, bool silent) { return phpdbg_parse_variable_with_arg(input, len, parent, i, (phpdbg_parse_var_with_arg_func) phpdbg_watchpoint_parse_wrapper, NULL, 0, info); } diff --git a/win32/readdir.c b/win32/readdir.c index efa7bd5966..8f24416b12 100644 --- a/win32/readdir.c +++ b/win32/readdir.c @@ -32,7 +32,7 @@ DIR *opendir(const char *dir) HANDLE handle; char resolved_path_buff[MAXPATHLEN]; size_t resolvedw_len, filespecw_len, index; - zend_bool might_need_prefix; + bool might_need_prefix; if (!VCWD_REALPATH(dir, resolved_path_buff)) { return NULL; @@ -151,7 +151,7 @@ int rewinddir(DIR *dp) wchar_t *filespecw; HANDLE handle; size_t dirw_len, filespecw_len, index; - zend_bool might_need_prefix; + bool might_need_prefix; FindClose(dp->handle); diff --git a/win32/signal.c b/win32/signal.c index 23a5acbff9..7604a3aac9 100644 --- a/win32/signal.c +++ b/win32/signal.c @@ -22,7 +22,7 @@ /* true globals; only used from main thread and from kernel callback */ static zval ctrl_handler; static DWORD ctrl_evt = (DWORD)-1; -static zend_bool *vm_interrupt_flag = NULL; +static bool *vm_interrupt_flag = NULL; static void (*orig_interrupt_function)(zend_execute_data *execute_data); @@ -89,7 +89,7 @@ PHP_FUNCTION(sapi_windows_set_ctrl_handler) { zend_fcall_info fci; zend_fcall_info_cache fcc; - zend_bool add = 1; + bool add = 1; /* callable argument corresponds to the CTRL handler */ @@ -134,7 +134,7 @@ PHP_FUNCTION(sapi_windows_set_ctrl_handler) PHP_FUNCTION(sapi_windows_generate_ctrl_event) {/*{{{*/ zend_long evt, pid = 0; - zend_bool ret = 0; + bool ret = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &evt, &pid) == FAILURE) { RETURN_THROWS(); |