diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-01-15 12:30:54 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-01-15 12:33:06 +0100 |
commit | 3e01f5afb1b52fe26a956190296de0192eedeec1 (patch) | |
tree | 77531ec93e3f3cef9891c77b5ca553eb8487f121 /ext/spl | |
parent | e2c8ab7c33ac5328485c43db5080c5bf4911ce38 (diff) | |
download | php-git-3e01f5afb1b52fe26a956190296de0192eedeec1.tar.gz |
Replace zend_bool uses with bool
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.
Of course, zend_bool is retained as an alias.
Diffstat (limited to 'ext/spl')
-rw-r--r-- | ext/spl/php_spl.c | 14 | ||||
-rw-r--r-- | ext/spl/spl_array.c | 6 | ||||
-rw-r--r-- | ext/spl/spl_directory.c | 6 | ||||
-rw-r--r-- | ext/spl/spl_dllist.c | 2 | ||||
-rw-r--r-- | ext/spl/spl_fixedarray.c | 4 | ||||
-rw-r--r-- | ext/spl/spl_iterators.c | 6 | ||||
-rw-r--r-- | ext/spl/spl_observer.c | 2 |
7 files changed, 20 insertions, 20 deletions
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index e2ca343b1b..67f87774a0 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -55,7 +55,7 @@ static PHP_GINIT_FUNCTION(spl) } /* }}} */ -static zend_class_entry * spl_find_ce_by_name(zend_string *name, zend_bool autoload) +static zend_class_entry * spl_find_ce_by_name(zend_string *name, bool autoload) { zend_class_entry *ce; @@ -80,7 +80,7 @@ PHP_FUNCTION(class_parents) { zval *obj; zend_class_entry *parent_class, *ce; - zend_bool autoload = 1; + bool autoload = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &obj, &autoload) == FAILURE) { RETURN_THROWS(); @@ -112,7 +112,7 @@ PHP_FUNCTION(class_parents) PHP_FUNCTION(class_implements) { zval *obj; - zend_bool autoload = 1; + bool autoload = 1; zend_class_entry *ce; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &obj, &autoload) == FAILURE) { @@ -140,7 +140,7 @@ PHP_FUNCTION(class_implements) PHP_FUNCTION(class_uses) { zval *obj; - zend_bool autoload = 1; + bool autoload = 1; zend_class_entry *ce; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &obj, &autoload) == FAILURE) { @@ -404,7 +404,7 @@ static autoload_func_info *autoload_func_info_from_fci( return alfi; } -static zend_bool autoload_func_info_equals( +static bool autoload_func_info_equals( const autoload_func_info *alfi1, const autoload_func_info *alfi2) { return alfi1->func_ptr == alfi2->func_ptr && alfi1->obj == alfi2->obj @@ -492,8 +492,8 @@ static Bucket *spl_find_registered_function(autoload_func_info *find_alfi) { /* {{{ Register given function as autoloader */ PHP_FUNCTION(spl_autoload_register) { - zend_bool do_throw = 1; - zend_bool prepend = 0; + bool do_throw = 1; + bool prepend = 0; zend_fcall_info fci = {0}; zend_fcall_info_cache fcc; autoload_func_info *alfi; diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 176e507a49..dc66241e44 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -111,7 +111,7 @@ static inline HashTable *spl_array_get_hash_table(spl_array_object* intern) { /* } /* }}} */ -static inline zend_bool spl_array_is_object(spl_array_object *intern) /* {{{ */ +static inline bool spl_array_is_object(spl_array_object *intern) /* {{{ */ { while (intern->ar_flags & SPL_ARRAY_USE_OTHER) { intern = Z_SPLARRAY_P(&intern->array); @@ -659,7 +659,7 @@ num_index: } { - zend_bool result = check_empty ? zend_is_true(value) : Z_TYPE_P(value) != IS_NULL; + bool result = check_empty ? zend_is_true(value) : Z_TYPE_P(value) != IS_NULL; if (value == &rv) { zval_ptr_dtor(&rv); } @@ -755,7 +755,7 @@ static HashTable *spl_array_get_properties_for(zend_object *object, zend_prop_pu { spl_array_object *intern = spl_array_from_obj(object); HashTable *ht; - zend_bool dup; + bool dup; if (intern->ar_flags & SPL_ARRAY_STD_PROP_LIST) { return zend_std_get_properties_for(object, purpose); diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 7d9ea9cc2b..1ba7aa11c5 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -478,7 +478,7 @@ static spl_filesystem_object *spl_filesystem_object_create_info(spl_filesystem_o static spl_filesystem_object *spl_filesystem_object_create_type(int num_args, spl_filesystem_object *source, int type, zend_class_entry *ce, zval *return_value) /* {{{ */ { spl_filesystem_object *intern; - zend_bool use_include_path = 0; + bool use_include_path = 0; zval arg1, arg2; zend_error_handling error_handling; @@ -1467,7 +1467,7 @@ PHP_METHOD(FilesystemIterator, setFlags) /* {{{ Returns whether current entry is a directory and not '.' or '..' */ PHP_METHOD(RecursiveDirectoryIterator, hasChildren) { - zend_bool allow_links = 0; + bool allow_links = 0; spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &allow_links) == FAILURE) { @@ -2051,7 +2051,7 @@ static void spl_filesystem_file_rewind(zval * this_ptr, spl_filesystem_object *i PHP_METHOD(SplFileObject, __construct) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); - zend_bool use_include_path = 0; + bool use_include_path = 0; char *p1, *p2; char *tmp_path; size_t tmp_path_len; diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index cc8723f05e..bc311589b6 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -764,7 +764,7 @@ PHP_METHOD(SplDoublyLinkedList, offsetGet) PHP_METHOD(SplDoublyLinkedList, offsetSet) { zend_long index; - zend_bool index_is_null = 1; + bool index_is_null = 1; zval *value; spl_dllist_object *intern; diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index 4c7ff5dd35..ea5e6ee984 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -470,7 +470,7 @@ static int spl_fixedarray_object_has_dimension(zend_object *object, zval *offset if (UNEXPECTED(intern->methods && intern->methods->fptr_offset_has)) { zval rv; - zend_bool result; + bool result; zend_call_method_with_1_params(object, intern->std.ce, &intern->methods->fptr_offset_has, "offsetExists", &rv, offset); result = zend_is_true(&rv); @@ -593,7 +593,7 @@ PHP_METHOD(SplFixedArray, fromArray) spl_fixedarray array; spl_fixedarray_object *intern; int num; - zend_bool save_indexes = 1; + bool save_indexes = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "a|b", &data, &save_indexes) == FAILURE) { RETURN_THROWS(); diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index 40538cda8e..a4531f6056 100644 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -93,7 +93,7 @@ typedef struct _spl_recursive_it_object { RecursiveIteratorMode mode; int flags; int max_depth; - zend_bool in_iteration; + bool in_iteration; zend_function *beginIteration; zend_function *endIteration; zend_function *callHasChildren; @@ -685,7 +685,7 @@ PHP_METHOD(RecursiveIteratorIterator, getSubIterator) { spl_recursive_it_object *object = Z_SPLRECURSIVE_IT_P(ZEND_THIS); zend_long level; - zend_bool level_is_null = 1; + bool level_is_null = 1; zval *value; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &level, &level_is_null) == FAILURE) { @@ -3135,7 +3135,7 @@ static int spl_iterator_to_values_apply(zend_object_iterator *iter, void *puser) PHP_FUNCTION(iterator_to_array) { zval *obj; - zend_bool use_keys = 1; + bool use_keys = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|b", &obj, zend_ce_traversable, &use_keys) == FAILURE) { RETURN_THROWS(); diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index ee8abb52d7..3fd50ceb89 100644 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -933,7 +933,7 @@ PHP_METHOD(MultipleIterator, attachIterator) zval zinfo; zend_string *info_str; zend_long info_long; - zend_bool info_is_null = 1; + bool info_is_null = 1; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_OBJ_OF_CLASS(iterator, zend_ce_iterator) |