helly Sat May 5 12:09:21 2007 UTC
Modified files:
/php-src/sapi/cli php_cli.c
Log:
- Simplify/use consts
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.176&r2=1.177&diff_format=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.176 php-src/sapi/cli/php_cli.c:1.177
--- php-src/sapi/cli/php_cli.c:1.176 Fri May 4 22:09:30 2007
+++ php-src/sapi/cli/php_cli.c Sat May 5 12:09:21 2007
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_cli.c,v 1.176 2007/05/04 22:09:30 helly Exp $ */
+/* $Id: php_cli.c,v 1.177 2007/05/05 12:09:21 helly Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -168,10 +168,10 @@
{'-', 0, NULL} /* end of args */
};
-static int print_module_info(zend_module_entry *module, void *arg TSRMLS_DC)
+static int print_module_info(zend_module_entry *module TSRMLS_DC)
{
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)
@@ -191,14 +191,14 @@
zend_hash_init(&sorted_registry, 50, NULL, NULL, 1);
zend_hash_copy(&sorted_registry, &module_registry, NULL, &tmp,
sizeof(zend_module_entry));
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);
}
static int print_extension_info(zend_extension *ext, void *arg TSRMLS_DC)
{
php_printf("%s\n", ext->name);
- return 0;
+ return ZEND_HASH_APPLY_KEEP;
}
static int extension_name_cmp(const zend_llist_element **f,
@@ -215,7 +215,7 @@
zend_llist_copy(&sorted_exts, &zend_extensions);
sorted_exts.dtor = NULL;
zend_llist_sort(&sorted_exts, extension_name_cmp TSRMLS_CC);
- zend_llist_apply_with_argument(&sorted_exts,
(llist_apply_with_arg_func_t) print_extension_info, NULL TSRMLS_CC);
+ zend_llist_apply(&sorted_exts, (llist_apply_func_t)
print_extension_info TSRMLS_CC);
zend_llist_destroy(&sorted_exts);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php