mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
Remove return value from llist apply functions
Unlike the hash apply functions, these do not return int.
This commit is contained in:
@@ -1674,11 +1674,10 @@ ZEND_FUNCTION(get_resources)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int add_zendext_info(zend_extension *ext, void *arg) /* {{{ */
|
||||
static void add_zendext_info(zend_extension *ext, void *arg) /* {{{ */
|
||||
{
|
||||
zval *name_array = (zval *)arg;
|
||||
add_next_index_string(name_array, ext->name);
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1695,7 +1694,7 @@ ZEND_FUNCTION(get_loaded_extensions)
|
||||
array_init(return_value);
|
||||
|
||||
if (zendext) {
|
||||
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t)add_zendext_info, return_value);
|
||||
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) add_zendext_info, return_value);
|
||||
} else {
|
||||
zend_module_entry *module;
|
||||
|
||||
|
||||
@@ -258,10 +258,9 @@ static void print_modules(void)
|
||||
zend_hash_destroy(&sorted_registry);
|
||||
}
|
||||
|
||||
static int print_extension_info(zend_extension *ext, void *arg)
|
||||
static void print_extension_info(zend_extension *ext)
|
||||
{
|
||||
php_printf("%s\n", ext->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int extension_name_cmp(const zend_llist_element **f, const zend_llist_element **s)
|
||||
@@ -278,7 +277,7 @@ static void print_extensions(void)
|
||||
zend_llist_copy(&sorted_exts, &zend_extensions);
|
||||
sorted_exts.dtor = NULL;
|
||||
zend_llist_sort(&sorted_exts, extension_name_cmp);
|
||||
zend_llist_apply_with_argument(&sorted_exts, (llist_apply_with_arg_func_t) print_extension_info, NULL);
|
||||
zend_llist_apply(&sorted_exts, (llist_apply_func_t) print_extension_info);
|
||||
zend_llist_destroy(&sorted_exts);
|
||||
}
|
||||
|
||||
|
||||
@@ -195,10 +195,9 @@ static void print_modules(void) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int print_extension_info(zend_extension *ext, void *arg) /* {{{ */
|
||||
static void print_extension_info(zend_extension *ext) /* {{{ */
|
||||
{
|
||||
php_printf("%s\n", ext->name);
|
||||
return ZEND_HASH_APPLY_KEEP;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -206,10 +206,9 @@ static void print_modules(void) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int print_extension_info(zend_extension *ext, void *arg) /* {{{ */
|
||||
static void print_extension_info(zend_extension *ext) /* {{{ */
|
||||
{
|
||||
php_printf("%s\n", ext->name);
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -228,7 +227,7 @@ static void print_extensions(void) /* {{{ */
|
||||
zend_llist_copy(&sorted_exts, &zend_extensions);
|
||||
sorted_exts.dtor = NULL;
|
||||
zend_llist_sort(&sorted_exts, extension_name_cmp);
|
||||
zend_llist_apply_with_argument(&sorted_exts, (llist_apply_with_arg_func_t) print_extension_info, NULL);
|
||||
zend_llist_apply(&sorted_exts, (llist_apply_func_t) print_extension_info);
|
||||
zend_llist_destroy(&sorted_exts);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1228,9 +1228,8 @@ static int add_module_info(zend_module_entry *module) /* {{{ */ {
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int add_zendext_info(zend_extension *ext) /* {{{ */ {
|
||||
static void add_zendext_info(zend_extension *ext) /* {{{ */ {
|
||||
phpdbg_write("extension", "name=\"%s\"", "%s\n", ext->name);
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -710,7 +710,6 @@ head_done:
|
||||
ZEND_HASH_FOREACH_KEY_VAL_IND(myht, num, key, val) {
|
||||
element_dump_func(val, key, num);
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
zend_hash_apply_with_arguments(myht, (apply_func_args_t) element_dump_func, 0);
|
||||
GC_UNPROTECT_RECURSION(myht);
|
||||
if (Z_TYPE_P(zv) == IS_OBJECT) {
|
||||
zend_release_properties(myht);
|
||||
|
||||
Reference in New Issue
Block a user