helly Tue Oct 5 14:37:18 2004 EDT Modified files: /php-src/ext/standard basic_functions.c Log: - Use ZEND_ARG_SEND_AUTOMATIC for several array functions http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.693&r2=1.694&ty=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.693 php-src/ext/standard/basic_functions.c:1.694 --- php-src/ext/standard/basic_functions.c:1.693 Mon Oct 4 16:17:06 2004 +++ php-src/ext/standard/basic_functions.c Tue Oct 5 14:37:17 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.693 2004/10/04 20:17:06 andi Exp $ */ +/* $Id: basic_functions.c,v 1.694 2004/10/05 18:37:17 helly Exp $ */ #include "php.h" #include "php_streams.h" @@ -143,6 +143,22 @@ ZEND_ARG_PASS_INFO(1) ZEND_END_ARG_INFO() +static + ZEND_BEGIN_ARG_INFO(all_args_auto_ref, 0) + ZEND_ARG_PASS_INFO(4) + ZEND_END_ARG_INFO() + +static + ZEND_BEGIN_ARG_INFO(first_arg_auto_ref, 0) + ZEND_ARG_PASS_INFO(4) + ZEND_END_ARG_INFO() + +static + ZEND_BEGIN_ARG_INFO(first_and_second_args_auto_ref, 0) + ZEND_ARG_PASS_INFO(4) + ZEND_ARG_PASS_INFO(4) + ZEND_END_ARG_INFO() + typedef struct _php_shutdown_function_entry { zval **arguments; int arg_count; @@ -764,8 +780,8 @@ PHP_FE(key, first_arg_force_ref) PHP_FE(min, NULL) PHP_FE(max, NULL) - PHP_FE(in_array, NULL) - PHP_FE(array_search, NULL) + PHP_FE(in_array, first_and_second_args_auto_ref) + PHP_FE(array_search, first_and_second_args_auto_ref) PHP_FE(extract, NULL) PHP_FE(compact, NULL) PHP_FE(array_fill, NULL) @@ -777,8 +793,8 @@ PHP_FE(array_unshift, first_arg_force_ref) PHP_FE(array_splice, first_arg_force_ref) PHP_FE(array_slice, NULL) - PHP_FE(array_merge, NULL) - PHP_FE(array_merge_recursive, NULL) + PHP_FE(array_merge, all_args_auto_ref) + PHP_FE(array_merge_recursive, all_args_auto_ref) PHP_FE(array_keys, NULL) PHP_FE(array_values, NULL) PHP_FE(array_count_values, NULL) @@ -789,33 +805,33 @@ PHP_FE(array_change_key_case, NULL) PHP_FE(array_rand, NULL) PHP_FE(array_unique, NULL) - PHP_FE(array_intersect, NULL) - PHP_FE(array_intersect_key, NULL) - PHP_FE(array_intersect_ukey, NULL) - PHP_FE(array_uintersect, NULL) - PHP_FE(array_intersect_assoc, NULL) - PHP_FE(array_uintersect_assoc, NULL) - PHP_FE(array_intersect_uassoc, NULL) - PHP_FE(array_uintersect_uassoc, NULL) - PHP_FE(array_diff, NULL) - PHP_FE(array_diff_key, NULL) - PHP_FE(array_diff_ukey, NULL) - PHP_FE(array_udiff, NULL) - PHP_FE(array_diff_assoc, NULL) - PHP_FE(array_udiff_assoc, NULL) - PHP_FE(array_diff_uassoc, NULL) - PHP_FE(array_udiff_uassoc, NULL) - PHP_FE(array_sum, NULL) - PHP_FE(array_filter, NULL) + PHP_FE(array_intersect, all_args_auto_ref) + PHP_FE(array_intersect_key, all_args_auto_ref) + PHP_FE(array_intersect_ukey, all_args_auto_ref) + PHP_FE(array_uintersect, all_args_auto_ref) + PHP_FE(array_intersect_assoc, all_args_auto_ref) + PHP_FE(array_uintersect_assoc, all_args_auto_ref) + PHP_FE(array_intersect_uassoc, all_args_auto_ref) + PHP_FE(array_uintersect_uassoc, all_args_auto_ref) + PHP_FE(array_diff, all_args_auto_ref) + PHP_FE(array_diff_key, all_args_auto_ref) + PHP_FE(array_diff_ukey, all_args_auto_ref) + PHP_FE(array_udiff, all_args_auto_ref) + PHP_FE(array_diff_assoc, all_args_auto_ref) + PHP_FE(array_udiff_assoc, all_args_auto_ref) + PHP_FE(array_diff_uassoc, all_args_auto_ref) + PHP_FE(array_udiff_uassoc, all_args_auto_ref) + PHP_FE(array_sum, first_arg_auto_ref) + PHP_FE(array_filter, first_arg_auto_ref) PHP_FE(array_map, NULL) PHP_FE(array_chunk, NULL) PHP_FE(array_combine, NULL) - PHP_FE(array_key_exists, NULL) + PHP_FE(array_key_exists, first_and_second_args_auto_ref) /* aliases from array.c */ PHP_FALIAS(pos, current, first_arg_force_ref) PHP_FALIAS(sizeof, count, NULL) - PHP_FALIAS(key_exists, array_key_exists, NULL) + PHP_FALIAS(key_exists, array_key_exists, first_and_second_args_auto_ref) /* functions from assert.c */ PHP_FE(assert, NULL)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php