summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-01-15 12:30:54 +0100
committerNikita Popov <nikita.ppv@gmail.com>2021-01-15 12:33:06 +0100
commit3e01f5afb1b52fe26a956190296de0192eedeec1 (patch)
tree77531ec93e3f3cef9891c77b5ca553eb8487f121 /Zend
parente2c8ab7c33ac5328485c43db5080c5bf4911ce38 (diff)
downloadphp-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.
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend.c16
-rw-r--r--Zend/zend.h6
-rw-r--r--Zend/zend_API.c62
-rw-r--r--Zend/zend_API.h52
-rw-r--r--Zend/zend_alloc.c4
-rw-r--r--Zend/zend_arena.h4
-rw-r--r--Zend/zend_ast.c6
-rw-r--r--Zend/zend_ast.h4
-rw-r--r--Zend/zend_attributes.c2
-rw-r--r--Zend/zend_attributes.h2
-rw-r--r--Zend/zend_bitset.h6
-rw-r--r--Zend/zend_builtin_functions.c30
-rw-r--r--Zend/zend_closures.c8
-rw-r--r--Zend/zend_compile.c244
-rw-r--r--Zend/zend_compile.h30
-rw-r--r--Zend/zend_constants.c4
-rw-r--r--Zend/zend_constants.h2
-rw-r--r--Zend/zend_cpuinfo.c4
-rw-r--r--Zend/zend_exceptions.c6
-rw-r--r--Zend/zend_exceptions.h2
-rw-r--r--Zend/zend_execute.c58
-rw-r--r--Zend/zend_execute.h20
-rw-r--r--Zend/zend_execute_API.c14
-rw-r--r--Zend/zend_gc.c20
-rw-r--r--Zend/zend_gc.h8
-rw-r--r--Zend/zend_generators.c2
-rw-r--r--Zend/zend_generators.h2
-rw-r--r--Zend/zend_globals.h34
-rw-r--r--Zend/zend_hash.c22
-rw-r--r--Zend/zend_hash.h28
-rw-r--r--Zend/zend_inheritance.c38
-rw-r--r--Zend/zend_inheritance.h4
-rw-r--r--Zend/zend_ini.c10
-rw-r--r--Zend/zend_ini.h12
-rw-r--r--Zend/zend_ini_parser.y4
-rw-r--r--Zend/zend_interfaces.c2
-rw-r--r--Zend/zend_language_scanner.h2
-rw-r--r--Zend/zend_language_scanner.l30
-rw-r--r--Zend/zend_object_handlers.c10
-rw-r--r--Zend/zend_object_handlers.h8
-rw-r--r--Zend/zend_objects_API.c2
-rw-r--r--Zend/zend_objects_API.h2
-rw-r--r--Zend/zend_opcode.c6
-rw-r--r--Zend/zend_operators.c30
-rw-r--r--Zend/zend_operators.h18
-rw-r--r--Zend/zend_portability.h2
-rw-r--r--Zend/zend_ptr_stack.c4
-rw-r--r--Zend/zend_ptr_stack.h6
-rw-r--r--Zend/zend_signal.h4
-rw-r--r--Zend/zend_smart_str.h18
-rw-r--r--Zend/zend_smart_string.h12
-rw-r--r--Zend/zend_stack.c2
-rw-r--r--Zend/zend_stack.h2
-rw-r--r--Zend/zend_stream.h2
-rw-r--r--Zend/zend_string.c10
-rw-r--r--Zend/zend_string.h10
-rw-r--r--Zend/zend_ts_hash.c4
-rw-r--r--Zend/zend_ts_hash.h4
-rw-r--r--Zend/zend_types.h2
-rw-r--r--Zend/zend_vm_def.h38
-rw-r--r--Zend/zend_vm_execute.h146
-rw-r--r--Zend/zend_weakrefs.c2
62 files changed, 574 insertions, 574 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;