diff options
author | George Peter Banyard <girgias@php.net> | 2020-08-28 15:41:27 +0200 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2020-08-28 15:41:27 +0200 |
commit | fa8d9b1183f961cb6e0f0ef5a2d1b1d3744fe35b (patch) | |
tree | a00044117c3f56969a7b77b466bbdbdd45d66db7 /Zend/zend_inheritance.c | |
parent | 7690439edd93bf9dc868cbc34a12fbad6b26e777 (diff) | |
download | php-git-fa8d9b1183f961cb6e0f0ef5a2d1b1d3744fe35b.tar.gz |
Improve type declarations for Zend APIs
Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functions which return true/false (1/0)
Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics
Closes GH-6002
Diffstat (limited to 'Zend/zend_inheritance.c')
-rw-r--r-- | Zend/zend_inheritance.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 158b67ce38..4d2e2d5400 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -633,7 +633,7 @@ static inheritance_status zend_do_perform_implementation_check( /* }}} */ static ZEND_COLD void zend_append_type_hint( - smart_str *str, zend_class_entry *scope, zend_arg_info *arg_info, int return_hint) /* {{{ */ + smart_str *str, zend_class_entry *scope, zend_arg_info *arg_info, bool return_hint) /* {{{ */ { if (ZEND_TYPE_IS_SET(arg_info->type)) { zend_string *type_str = zend_type_to_string_resolved(arg_info->type, scope); @@ -2390,7 +2390,7 @@ static void check_unrecoverable_load_failure(zend_class_entry *ce) { } } -ZEND_API int zend_do_link_class(zend_class_entry *ce, zend_string *lc_parent_name) /* {{{ */ +ZEND_API zend_result zend_do_link_class(zend_class_entry *ce, zend_string *lc_parent_name) /* {{{ */ { /* Load parent/interface dependencies first, so we can still gracefully abort linking * with an exception and remove the class from the class table. This is only possible |