mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Fix php-cgi -m
This commit is contained in:
parent
2c24cdb4a3
commit
257bf697ae
@ -215,10 +215,11 @@ static php_cgi_globals_struct php_cgi_globals;
|
|||||||
#define TRANSLATE_SLASHES(path)
|
#define TRANSLATE_SLASHES(path)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int print_module_info(zend_module_entry *module, void *arg TSRMLS_DC)
|
static int print_module_info(zval *element TSRMLS_DC)
|
||||||
{
|
{
|
||||||
|
zend_module_entry *module = Z_PTR_P(element);
|
||||||
php_printf("%s\n", module->name);
|
php_printf("%s\n", module->name);
|
||||||
return 0;
|
return ZEND_HASH_APPLY_KEEP;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int module_name_cmp(const void *a, const void *b TSRMLS_DC)
|
static int module_name_cmp(const void *a, const void *b TSRMLS_DC)
|
||||||
@ -238,7 +239,7 @@ static void print_modules(TSRMLS_D)
|
|||||||
//??? zend_hash_copy(&sorted_registry, &module_registry, NULL, &tmp, sizeof(zend_module_entry));
|
//??? zend_hash_copy(&sorted_registry, &module_registry, NULL, &tmp, sizeof(zend_module_entry));
|
||||||
zend_hash_copy(&sorted_registry, &module_registry, NULL);
|
zend_hash_copy(&sorted_registry, &module_registry, NULL);
|
||||||
zend_hash_sort(&sorted_registry, zend_qsort, module_name_cmp, 0 TSRMLS_CC);
|
zend_hash_sort(&sorted_registry, zend_qsort, module_name_cmp, 0 TSRMLS_CC);
|
||||||
zend_hash_apply_with_argument(&sorted_registry, (apply_func_arg_t) print_module_info, NULL TSRMLS_CC);
|
zend_hash_apply(&sorted_registry, (apply_func_t) print_module_info TSRMLS_CC);
|
||||||
zend_hash_destroy(&sorted_registry);
|
zend_hash_destroy(&sorted_registry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user