com php-src: Fix php-cgi -m: sapi/cgi/cgi_main.c

From: Date: Wed, 30 Apr 2014 22:25:23 +0000
Subject: com php-src: Fix php-cgi -m: sapi/cgi/cgi_main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77264@lists.php.net to get a copy of this message
Commit: 257bf697ae9b2ae366f7f3726019c18ad92b9002 Author: Nikita Popov <nikic@php.net> Sat, 26 Apr 2014 13:56:19 +0200 Parents: 2c24cdb4a34812c0835d2365b67cef6d5d67ebad Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=257bf697ae9b2ae366f7f3726019c18ad92b9002 Log: Fix php-cgi -m Changed paths: M sapi/cgi/cgi_main.c Diff: diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 3b4abcf..4253e69 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -215,10 +215,11 @@ static php_cgi_globals_struct php_cgi_globals; #define TRANSLATE_SLASHES(path) #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); - return 0; + return ZEND_HASH_APPLY_KEEP; } 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); 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); }

« previous php.cvs (#77264) next »