cvs: php4 /ext/mbstring mbstring.c /ext/ovrimos ovrimos.c /ext/pcntl pcntl.c /ext/pcre php_pcre.c /ext/standard basic_functions.c dns.c exec.c
image.c reg.c /ext/yaz php_yaz.c
| From: | Zeev Suraski | Date: | Mon, 30 Jul 2001 05:36:16 +0000 |
| Subject: | cvs: php4 /ext/mbstring mbstring.c /ext/ovrimos ovrimos.c /ext/pcntl pcntl.c /ext/pcre php_pcre.c /ext/standard basic_functions.c dns.c exec.c image.c reg.c /ext/yaz php_yaz.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6400@lists.php.net to get a copy of this message | ||
zeev Mon Jul 30 01:36:16 2001 EDT
Modified files:
/php4/ext/mbstring mbstring.c
/php4/ext/ovrimos ovrimos.c
/php4/ext/pcntl pcntl.c
/php4/ext/pcre php_pcre.c
/php4/ext/standard basic_functions.c dns.c exec.c image.c reg.c
/php4/ext/yaz php_yaz.c
Log:
Zend compatibility patch
Index: php4/ext/mbstring/mbstring.c diff -u php4/ext/mbstring/mbstring.c:1.24 php4/ext/mbstring/mbstring.c:1.25 --- php4/ext/mbstring/mbstring.c:1.24 Sun Jul 29 18:15:40 2001 +++ php4/ext/mbstring/mbstring.c Mon Jul 30 01:36:13 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mbstring.c,v 1.24 2001/07/29 22:15:40 hirokawa Exp $ */ +/* $Id: mbstring.c,v 1.25 2001/07/30 05:36:13 zeev Exp $ */ /* * PHP4 Multibyte String module "mbstring" (currently only for Japanese) @@ -2321,11 +2321,6 @@ n = 2; while (n < argc || stack_level > 0) { if (stack_level <= 0) { - if (!ParameterPassedByReference(ht, n + 1)) { - n++; - php_error(E_WARNING, "argument %d not passed by reference", n); - continue; - } var = args[n++]; if (Z_TYPE_PP(var) == IS_ARRAY || Z_TYPE_PP(var) == IS_OBJECT) { target_hash = HASH_OF(*var); Index: php4/ext/ovrimos/ovrimos.c diff -u php4/ext/ovrimos/ovrimos.c:1.10 php4/ext/ovrimos/ovrimos.c:1.11 --- php4/ext/ovrimos/ovrimos.c:1.10 Thu Jul 26 06:11:33 2001 +++ php4/ext/ovrimos/ovrimos.c Mon Jul 30 01:36:13 2001 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ovrimos.c,v 1.10 2001/07/26 10:11:33 nmav Exp $ */ +/* $Id: ovrimos.c,v 1.11 2001/07/30 05:36:13 zeev Exp $ */ #include <php.h> #include <php_globals.h> @@ -699,12 +699,6 @@ } } - if (!ParameterPassedByReference(ht, 2)) { /* 1-based?... */ - php_error(E_WARNING, - "Array not passed by reference in call to ovrimos_fetch_into()"); - RETURN_FALSE; - } - if (arr->type != IS_ARRAY) { if (array_init(arr) == FAILURE) { php_error(E_WARNING, @@ -1287,7 +1281,7 @@ PHP_FE(ovrimos_prepare, NULL) PHP_FE(ovrimos_execute, NULL) PHP_FE(ovrimos_fetch_row, NULL) - PHP_FE(ovrimos_fetch_into, NULL) + PHP_FE(ovrimos_fetch_into, second_arg_force_ref) PHP_FE(ovrimos_field_len, NULL) PHP_FE(ovrimos_field_name, NULL) PHP_FE(ovrimos_field_type, NULL) Index: php4/ext/pcntl/pcntl.c diff -u php4/ext/pcntl/pcntl.c:1.7 php4/ext/pcntl/pcntl.c:1.8 --- php4/ext/pcntl/pcntl.c:1.7 Fri Jul 6 02:00:51 2001 +++ php4/ext/pcntl/pcntl.c Mon Jul 30 01:36:13 2001 @@ -40,7 +40,7 @@ function_entry pcntl_functions[] = { PHP_FE(pcntl_fork, NULL) - PHP_FE(pcntl_waitpid, NULL) + PHP_FE(pcntl_waitpid, second_arg_force_ref) PHP_FE(pcntl_signal, NULL) PHP_FE(pcntl_wifexited, NULL) PHP_FE(pcntl_wifstopped, NULL) @@ -212,13 +212,7 @@ } convert_to_long_ex(pid); - convert_to_long_ex(options); - - if (!ParameterPassedByReference(ht, 2)) { - php_error(E_WARNING, "Status not passed by reference in %s", get_active_function_name()); - RETURN_FALSE; - } - + convert_to_long_ex(options); convert_to_long_ex(status); if (ZEND_NUM_ARGS()==2) temp_options=0; Index: php4/ext/pcre/php_pcre.c diff -u php4/ext/pcre/php_pcre.c:1.104 php4/ext/pcre/php_pcre.c:1.105 --- php4/ext/pcre/php_pcre.c:1.104 Sun Jul 29 21:56:34 2001 +++ php4/ext/pcre/php_pcre.c Mon Jul 30 01:36:13 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.c,v 1.104 2001/07/30 01:56:34 zeev Exp $ */ +/* $Id: php_pcre.c,v 1.105 2001/07/30 05:36:13 zeev Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -366,20 +366,12 @@ } if (global) subpats_order_val = PREG_PATTERN_ORDER; - if (!ParameterPassedByReference(ht, 3)) { - zend_error(E_WARNING, "Array to be filled with matches must be passed by reference."); - RETURN_FALSE; - } break; case 4: if (zend_get_parameters_ex(4, ®ex, &subject, &subpats, &subpats_order) == FAILURE) { WRONG_PARAM_COUNT; } - if (!ParameterPassedByReference(ht, 3)) { - zend_error(E_WARNING, "Array to be filled with matches must be passed by reference."); - RETURN_FALSE; - } /* Make sure subpats_order is a number */ convert_to_long_ex(subpats_order); @@ -1377,8 +1369,6 @@ /* }}} */ /* {{{ module definition structures */ - -unsigned char third_arg_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; function_entry pcre_functions[] = { PHP_FE(preg_match, third_arg_force_ref) Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.365 php4/ext/standard/basic_functions.c:1.366 --- php4/ext/standard/basic_functions.c:1.365 Mon Jul 30 00:58:04 2001 +++ php4/ext/standard/basic_functions.c Mon Jul 30 01:36:14 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.365 2001/07/30 04:58:04 zeev Exp $ */ +/* $Id: basic_functions.c,v 1.366 2001/07/30 05:36:14 zeev Exp $ */ #include "php.h" #include "php_main.h" @@ -72,7 +72,6 @@ static unsigned char second_and_third_args_force_ref[] = { 3, BYREF_NONE, BYREF_FORCE, BYREF_FORCE }; static unsigned char second_args_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE }; -static unsigned char third_argument_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; static unsigned char third_and_fourth_args_force_ref[] = { 4, BYREF_NONE, BYREF_NONE, BYREF_FORCE, BYREF_FORCE }; static unsigned char third_and_rest_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE_REST }; @@ -188,7 +187,7 @@ PHP_FE(trim, NULL) PHP_FE(ltrim, NULL) PHP_FE(strip_tags, NULL) - PHP_FE(similar_text, third_argument_force_ref) + PHP_FE(similar_text, third_arg_force_ref) PHP_FE(explode, NULL) PHP_FE(implode, NULL) PHP_FE(setlocale, NULL) @@ -335,21 +334,21 @@ PHP_FE(get_magic_quotes_gpc, NULL) PHP_FE(get_magic_quotes_runtime, NULL) - PHP_FE(is_null, first_arg_allow_ref) - PHP_FE(is_resource, first_arg_allow_ref) - PHP_FE(is_bool, first_arg_allow_ref) - PHP_FE(is_long, first_arg_allow_ref) - PHP_FALIAS(is_int, is_long, first_arg_allow_ref) - PHP_FALIAS(is_integer, is_long, first_arg_allow_ref) - PHP_FALIAS(is_float, is_double, first_arg_allow_ref) - PHP_FE(is_double, first_arg_allow_ref) - PHP_FALIAS(is_real, is_double, first_arg_allow_ref) + PHP_FE(is_null, NULL) + PHP_FE(is_resource, NULL) + PHP_FE(is_bool, NULL) + PHP_FE(is_long, NULL) + PHP_FALIAS(is_int, is_long, NULL) + PHP_FALIAS(is_integer, is_long, NULL) + PHP_FALIAS(is_float, is_double, NULL) + PHP_FE(is_double, NULL) + PHP_FALIAS(is_real, is_double, NULL) PHP_FE(is_numeric, NULL) - PHP_FE(is_string, first_arg_allow_ref) - PHP_FE(is_array, first_arg_allow_ref) - PHP_FE(is_object, first_arg_allow_ref) + PHP_FE(is_string, NULL) + PHP_FE(is_array, NULL) + PHP_FE(is_object, NULL) PHP_FE(is_scalar, NULL) - PHP_FE(is_callable, third_argument_force_ref) + PHP_FE(is_callable, third_arg_force_ref) PHP_FE(error_log, NULL) PHP_FE(call_user_func, NULL) @@ -358,8 +357,8 @@ PHP_FE(call_user_method_array, second_arg_force_ref) PHP_FE(var_dump, NULL) - PHP_FE(serialize, first_arg_allow_ref) - PHP_FE(unserialize, first_arg_allow_ref) + PHP_FE(serialize, NULL) + PHP_FE(unserialize, NULL) PHP_FE(register_shutdown_function, NULL) @@ -391,9 +390,9 @@ PHP_FE(move_uploaded_file, NULL) /* functions from reg.c */ - PHP_FE(ereg, third_argument_force_ref) + PHP_FE(ereg, third_arg_force_ref) PHP_FE(ereg_replace, NULL) - PHP_FE(eregi, third_argument_force_ref) + PHP_FE(eregi, third_arg_force_ref) PHP_FE(eregi_replace, NULL) PHP_FE(split, NULL) PHP_FE(spliti, NULL) @@ -563,7 +562,7 @@ PHP_FE(uksort, first_arg_force_ref) PHP_FE(shuffle, first_arg_force_ref) PHP_FE(array_walk, first_arg_force_ref) - PHP_FE(count, first_arg_allow_ref) + PHP_FE(count, NULL) PHP_FE(end, first_arg_force_ref) PHP_FE(prev, first_arg_force_ref) PHP_FE(next, first_arg_force_ref) @@ -604,7 +603,7 @@ /* aliases from array.c */ PHP_FALIAS(pos, current, first_arg_force_ref) - PHP_FALIAS(sizeof, count, first_arg_allow_ref) + PHP_FALIAS(sizeof, count, NULL) /* functions from assert.c */ PHP_FE(assert, NULL) Index: php4/ext/standard/dns.c diff -u php4/ext/standard/dns.c:1.30 php4/ext/standard/dns.c:1.31 --- php4/ext/standard/dns.c:1.30 Wed Jun 6 09:05:51 2001 +++ php4/ext/standard/dns.c Mon Jul 30 01:36:14 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dns.c,v 1.30 2001/06/06 13:05:51 rasmus Exp $ */ +/* $Id: dns.c,v 1.31 2001/07/30 05:36:14 zeev Exp $ */ /* {{{ includes */ @@ -256,18 +256,10 @@ if (zend_get_parameters(ht, 2, &host, &mx_list) == FAILURE) { WRONG_PARAM_COUNT; } - if (!ParameterPassedByReference(ht, 2)) { - php_error(E_WARNING, "Array to be filled with values must be passed by reference."); - RETURN_FALSE; - } break; case 3: if (zend_get_parameters(ht, 3, &host, &mx_list, &weight_list) == FAILURE) { WRONG_PARAM_COUNT; - } - if (!ParameterPassedByReference(ht, 2) || !ParameterPassedByReference(ht, 3)) { - php_error(E_WARNING, "Array to be filled with values must be passed by reference."); - RETURN_FALSE; } need_weight = 1; pval_destructor(weight_list); /* start with clean array */ Index: php4/ext/standard/exec.c diff -u php4/ext/standard/exec.c:1.58 php4/ext/standard/exec.c:1.59 --- php4/ext/standard/exec.c:1.58 Sat Jul 28 07:36:15 2001 +++ php4/ext/standard/exec.c Mon Jul 30 01:36:14 2001 @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf | +----------------------------------------------------------------------+ */ -/* $Id: exec.c,v 1.58 2001/07/28 11:36:15 zeev Exp $ */ +/* $Id: exec.c,v 1.59 2001/07/30 05:36:14 zeev Exp $ */ #include <stdio.h> #include "php.h" @@ -251,18 +251,9 @@ ret = php_Exec(0, Z_STRVAL_PP(arg1), NULL,return_value); break; case 2: - if (!ParameterPassedByReference(ht,2)) { - php_error(E_WARNING,"Array argument to exec() not passed by reference"); - } ret = php_Exec(2, Z_STRVAL_PP(arg1),*arg2,return_value); break; case 3: - if (!ParameterPassedByReference(ht,2)) { - php_error(E_WARNING,"Array argument to exec() not passed by reference"); - } - if (!ParameterPassedByReference(ht,3)) { - php_error(E_WARNING,"return_status argument to exec() not passed by reference"); - } ret = php_Exec(2,Z_STRVAL_PP(arg1),*arg2,return_value); Z_TYPE_PP(arg3) = IS_LONG; Z_LVAL_PP(arg3)=ret; @@ -288,9 +279,6 @@ ret = php_Exec(1, Z_STRVAL_PP(arg1), NULL,return_value); break; case 2: - if (!ParameterPassedByReference(ht,2)) { - php_error(E_WARNING,"return_status argument to system() not passed by reference"); - } ret = php_Exec(1, Z_STRVAL_PP(arg1), NULL,return_value); Z_TYPE_PP(arg2) = IS_LONG; Z_LVAL_PP(arg2)=ret; @@ -315,9 +303,6 @@ ret = php_Exec(3, Z_STRVAL_PP(arg1), NULL,return_value); break; case 2: - if (!ParameterPassedByReference(ht,2)) { - php_error(E_WARNING,"return_status argument to system() not passed by reference"); - } ret = php_Exec(3, Z_STRVAL_PP(arg1), NULL,return_value); Z_TYPE_PP(arg2) = IS_LONG; Z_LVAL_PP(arg2)=ret; Index: php4/ext/standard/image.c diff -u php4/ext/standard/image.c:1.34 php4/ext/standard/image.c:1.35 --- php4/ext/standard/image.c:1.34 Wed Jun 6 09:05:51 2001 +++ php4/ext/standard/image.c Mon Jul 30 01:36:14 2001 @@ -15,7 +15,7 @@ | Authors: Rasmus Lerdorf | +----------------------------------------------------------------------+ */ -/* $Id: image.c,v 1.34 2001/06/06 13:05:51 rasmus Exp $ */ +/* $Id: image.c,v 1.35 2001/07/30 05:36:14 zeev Exp $ */ /* * Based on Daniel Schmitt's imageinfo.c which carried the following * Copyright notice. @@ -422,11 +422,6 @@ if (zend_get_parameters_ex(2, &arg1, &info) == FAILURE) { WRONG_PARAM_COUNT; } - if (!ParameterPassedByReference(ht, 2)) { - php_error(E_WARNING, "Array to be filled with values must be passed by reference."); - RETURN_FALSE; - } - zval_dtor(*info); if (array_init(*info) == FAILURE) { Index: php4/ext/standard/reg.c diff -u php4/ext/standard/reg.c:1.45 php4/ext/standard/reg.c:1.46 --- php4/ext/standard/reg.c:1.45 Sat Jul 28 07:36:18 2001 +++ php4/ext/standard/reg.c Mon Jul 30 01:36:15 2001 @@ -17,7 +17,7 @@ | Jaakko Hyvätti <jaakko@hyvatti.iki.fi> | +----------------------------------------------------------------------+ */ -/* $Id: reg.c,v 1.45 2001/07/28 11:36:18 zeev Exp $ */ +/* $Id: reg.c,v 1.46 2001/07/30 05:36:15 zeev Exp $ */ #include <stdio.h> #include "php.h" @@ -193,10 +193,6 @@ case 3: if (zend_get_parameters_ex(3, ®ex, &findin, &array) == FAILURE) { WRONG_PARAM_COUNT; - } - if (!ParameterPassedByReference(ht, 3)) { - php_error(E_WARNING, "Array to be filled with values must be passed by reference."); - RETURN_FALSE; } break; default: Index: php4/ext/yaz/php_yaz.c diff -u php4/ext/yaz/php_yaz.c:1.23 php4/ext/yaz/php_yaz.c:1.24 --- php4/ext/yaz/php_yaz.c:1.23 Thu Jul 19 09:27:56 2001 +++ php4/ext/yaz/php_yaz.c Mon Jul 30 01:36:15 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_yaz.c,v 1.23 2001/07/19 13:27:56 dickmeiss Exp $ */ +/* $Id: php_yaz.c,v 1.24 2001/07/30 05:36:15 zeev Exp $ */ #include "php.h" @@ -2188,10 +2188,6 @@ { WRONG_PARAM_COUNT; } - if (!ParameterPassedByReference(ht, 2)) - { - WRONG_PARAM_COUNT; - } } else if (ZEND_NUM_ARGS() == 1) { @@ -2325,10 +2321,6 @@ WRONG_PARAM_COUNT; } - if (!ParameterPassedByReference(ht, 3)) { - php_error(E_WARNING, "Third argument must be passed by reference."); - RETURN_FALSE; - } pval_destructor(*pval_res); if (array_init(*pval_res) == FAILURE) {
Index: php4/ext/mbstring/mbstring.c diff -u php4/ext/mbstring/mbstring.c:1.24 php4/ext/mbstring/mbstring.c:1.25 --- php4/ext/mbstring/mbstring.c:1.24 Sun Jul 29 18:15:40 2001 +++ php4/ext/mbstring/mbstring.c Mon Jul 30 01:36:13 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mbstring.c,v 1.24 2001/07/29 22:15:40 hirokawa Exp $ */ +/* $Id: mbstring.c,v 1.25 2001/07/30 05:36:13 zeev Exp $ */ /* * PHP4 Multibyte String module "mbstring" (currently only for Japanese) @@ -2321,11 +2321,6 @@ n = 2; while (n < argc || stack_level > 0) { if (stack_level <= 0) { - if (!ParameterPassedByReference(ht, n + 1)) { - n++; - php_error(E_WARNING, "argument %d not passed by reference", n); - continue; - } var = args[n++]; if (Z_TYPE_PP(var) == IS_ARRAY || Z_TYPE_PP(var) == IS_OBJECT) { target_hash = HASH_OF(*var); Index: php4/ext/ovrimos/ovrimos.c diff -u php4/ext/ovrimos/ovrimos.c:1.10 php4/ext/ovrimos/ovrimos.c:1.11 --- php4/ext/ovrimos/ovrimos.c:1.10 Thu Jul 26 06:11:33 2001 +++ php4/ext/ovrimos/ovrimos.c Mon Jul 30 01:36:13 2001 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ovrimos.c,v 1.10 2001/07/26 10:11:33 nmav Exp $ */ +/* $Id: ovrimos.c,v 1.11 2001/07/30 05:36:13 zeev Exp $ */ #include <php.h> #include <php_globals.h> @@ -699,12 +699,6 @@ } } - if (!ParameterPassedByReference(ht, 2)) { /* 1-based?... */ - php_error(E_WARNING, - "Array not passed by reference in call to ovrimos_fetch_into()"); - RETURN_FALSE; - } - if (arr->type != IS_ARRAY) { if (array_init(arr) == FAILURE) { php_error(E_WARNING, @@ -1287,7 +1281,7 @@ PHP_FE(ovrimos_prepare, NULL) PHP_FE(ovrimos_execute, NULL) PHP_FE(ovrimos_fetch_row, NULL) - PHP_FE(ovrimos_fetch_into, NULL) + PHP_FE(ovrimos_fetch_into, second_arg_force_ref) PHP_FE(ovrimos_field_len, NULL) PHP_FE(ovrimos_field_name, NULL) PHP_FE(ovrimos_field_type, NULL) Index: php4/ext/pcntl/pcntl.c diff -u php4/ext/pcntl/pcntl.c:1.7 php4/ext/pcntl/pcntl.c:1.8 --- php4/ext/pcntl/pcntl.c:1.7 Fri Jul 6 02:00:51 2001 +++ php4/ext/pcntl/pcntl.c Mon Jul 30 01:36:13 2001 @@ -40,7 +40,7 @@ function_entry pcntl_functions[] = { PHP_FE(pcntl_fork, NULL) - PHP_FE(pcntl_waitpid, NULL) + PHP_FE(pcntl_waitpid, second_arg_force_ref) PHP_FE(pcntl_signal, NULL) PHP_FE(pcntl_wifexited, NULL) PHP_FE(pcntl_wifstopped, NULL) @@ -212,13 +212,7 @@ } convert_to_long_ex(pid); - convert_to_long_ex(options); - - if (!ParameterPassedByReference(ht, 2)) { - php_error(E_WARNING, "Status not passed by reference in %s", get_active_function_name()); - RETURN_FALSE; - } - + convert_to_long_ex(options); convert_to_long_ex(status); if (ZEND_NUM_ARGS()==2) temp_options=0; Index: php4/ext/pcre/php_pcre.c diff -u php4/ext/pcre/php_pcre.c:1.104 php4/ext/pcre/php_pcre.c:1.105 --- php4/ext/pcre/php_pcre.c:1.104 Sun Jul 29 21:56:34 2001 +++ php4/ext/pcre/php_pcre.c Mon Jul 30 01:36:13 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.c,v 1.104 2001/07/30 01:56:34 zeev Exp $ */ +/* $Id: php_pcre.c,v 1.105 2001/07/30 05:36:13 zeev Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -366,20 +366,12 @@ } if (global) subpats_order_val = PREG_PATTERN_ORDER; - if (!ParameterPassedByReference(ht, 3)) { - zend_error(E_WARNING, "Array to be filled with matches must be passed by reference."); - RETURN_FALSE; - } break; case 4: if (zend_get_parameters_ex(4, ®ex, &subject, &subpats, &subpats_order) == FAILURE) { WRONG_PARAM_COUNT; } - if (!ParameterPassedByReference(ht, 3)) { - zend_error(E_WARNING, "Array to be filled with matches must be passed by reference."); - RETURN_FALSE; - } /* Make sure subpats_order is a number */ convert_to_long_ex(subpats_order); @@ -1377,8 +1369,6 @@ /* }}} */ /* {{{ module definition structures */ - -unsigned char third_arg_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; function_entry pcre_functions[] = { PHP_FE(preg_match, third_arg_force_ref) Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.365 php4/ext/standard/basic_functions.c:1.366 --- php4/ext/standard/basic_functions.c:1.365 Mon Jul 30 00:58:04 2001 +++ php4/ext/standard/basic_functions.c Mon Jul 30 01:36:14 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.365 2001/07/30 04:58:04 zeev Exp $ */ +/* $Id: basic_functions.c,v 1.366 2001/07/30 05:36:14 zeev Exp $ */ #include "php.h" #include "php_main.h" @@ -72,7 +72,6 @@ static unsigned char second_and_third_args_force_ref[] = { 3, BYREF_NONE, BYREF_FORCE, BYREF_FORCE }; static unsigned char second_args_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE }; -static unsigned char third_argument_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; static unsigned char third_and_fourth_args_force_ref[] = { 4, BYREF_NONE, BYREF_NONE, BYREF_FORCE, BYREF_FORCE }; static unsigned char third_and_rest_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE_REST }; @@ -188,7 +187,7 @@ PHP_FE(trim, NULL) PHP_FE(ltrim, NULL) PHP_FE(strip_tags, NULL) - PHP_FE(similar_text, third_argument_force_ref) + PHP_FE(similar_text, third_arg_force_ref) PHP_FE(explode, NULL) PHP_FE(implode, NULL) PHP_FE(setlocale, NULL) @@ -335,21 +334,21 @@ PHP_FE(get_magic_quotes_gpc, NULL) PHP_FE(get_magic_quotes_runtime, NULL) - PHP_FE(is_null, first_arg_allow_ref) - PHP_FE(is_resource, first_arg_allow_ref) - PHP_FE(is_bool, first_arg_allow_ref) - PHP_FE(is_long, first_arg_allow_ref) - PHP_FALIAS(is_int, is_long, first_arg_allow_ref) - PHP_FALIAS(is_integer, is_long, first_arg_allow_ref) - PHP_FALIAS(is_float, is_double, first_arg_allow_ref) - PHP_FE(is_double, first_arg_allow_ref) - PHP_FALIAS(is_real, is_double, first_arg_allow_ref) + PHP_FE(is_null, NULL) + PHP_FE(is_resource, NULL) + PHP_FE(is_bool, NULL) + PHP_FE(is_long, NULL) + PHP_FALIAS(is_int, is_long, NULL) + PHP_FALIAS(is_integer, is_long, NULL) + PHP_FALIAS(is_float, is_double, NULL) + PHP_FE(is_double, NULL) + PHP_FALIAS(is_real, is_double, NULL) PHP_FE(is_numeric, NULL) - PHP_FE(is_string, first_arg_allow_ref) - PHP_FE(is_array, first_arg_allow_ref) - PHP_FE(is_object, first_arg_allow_ref) + PHP_FE(is_string, NULL) + PHP_FE(is_array, NULL) + PHP_FE(is_object, NULL) PHP_FE(is_scalar, NULL) - PHP_FE(is_callable, third_argument_force_ref) + PHP_FE(is_callable, third_arg_force_ref) PHP_FE(error_log, NULL) PHP_FE(call_user_func, NULL) @@ -358,8 +357,8 @@ PHP_FE(call_user_method_array, second_arg_force_ref) PHP_FE(var_dump, NULL) - PHP_FE(serialize, first_arg_allow_ref) - PHP_FE(unserialize, first_arg_allow_ref) + PHP_FE(serialize, NULL) + PHP_FE(unserialize, NULL) PHP_FE(register_shutdown_function, NULL) @@ -391,9 +390,9 @@ PHP_FE(move_uploaded_file, NULL) /* functions from reg.c */ - PHP_FE(ereg, third_argument_force_ref) + PHP_FE(ereg, third_arg_force_ref) PHP_FE(ereg_replace, NULL) - PHP_FE(eregi, third_argument_force_ref) + PHP_FE(eregi, third_arg_force_ref) PHP_FE(eregi_replace, NULL) PHP_FE(split, NULL) PHP_FE(spliti, NULL) @@ -563,7 +562,7 @@ PHP_FE(uksort, first_arg_force_ref) PHP_FE(shuffle, first_arg_force_ref) PHP_FE(array_walk, first_arg_force_ref) - PHP_FE(count, first_arg_allow_ref) + PHP_FE(count, NULL) PHP_FE(end, first_arg_force_ref) PHP_FE(prev, first_arg_force_ref) PHP_FE(next, first_arg_force_ref) @@ -604,7 +603,7 @@ /* aliases from array.c */ PHP_FALIAS(pos, current, first_arg_force_ref) - PHP_FALIAS(sizeof, count, first_arg_allow_ref) + PHP_FALIAS(sizeof, count, NULL) /* functions from assert.c */ PHP_FE(assert, NULL) Index: php4/ext/standard/dns.c diff -u php4/ext/standard/dns.c:1.30 php4/ext/standard/dns.c:1.31 --- php4/ext/standard/dns.c:1.30 Wed Jun 6 09:05:51 2001 +++ php4/ext/standard/dns.c Mon Jul 30 01:36:14 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dns.c,v 1.30 2001/06/06 13:05:51 rasmus Exp $ */ +/* $Id: dns.c,v 1.31 2001/07/30 05:36:14 zeev Exp $ */ /* {{{ includes */ @@ -256,18 +256,10 @@ if (zend_get_parameters(ht, 2, &host, &mx_list) == FAILURE) { WRONG_PARAM_COUNT; } - if (!ParameterPassedByReference(ht, 2)) { - php_error(E_WARNING, "Array to be filled with values must be passed by reference."); - RETURN_FALSE; - } break; case 3: if (zend_get_parameters(ht, 3, &host, &mx_list, &weight_list) == FAILURE) { WRONG_PARAM_COUNT; - } - if (!ParameterPassedByReference(ht, 2) || !ParameterPassedByReference(ht, 3)) { - php_error(E_WARNING, "Array to be filled with values must be passed by reference."); - RETURN_FALSE; } need_weight = 1; pval_destructor(weight_list); /* start with clean array */ Index: php4/ext/standard/exec.c diff -u php4/ext/standard/exec.c:1.58 php4/ext/standard/exec.c:1.59 --- php4/ext/standard/exec.c:1.58 Sat Jul 28 07:36:15 2001 +++ php4/ext/standard/exec.c Mon Jul 30 01:36:14 2001 @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf | +----------------------------------------------------------------------+ */ -/* $Id: exec.c,v 1.58 2001/07/28 11:36:15 zeev Exp $ */ +/* $Id: exec.c,v 1.59 2001/07/30 05:36:14 zeev Exp $ */ #include <stdio.h> #include "php.h" @@ -251,18 +251,9 @@ ret = php_Exec(0, Z_STRVAL_PP(arg1), NULL,return_value); break; case 2: - if (!ParameterPassedByReference(ht,2)) { - php_error(E_WARNING,"Array argument to exec() not passed by reference"); - } ret = php_Exec(2, Z_STRVAL_PP(arg1),*arg2,return_value); break; case 3: - if (!ParameterPassedByReference(ht,2)) { - php_error(E_WARNING,"Array argument to exec() not passed by reference"); - } - if (!ParameterPassedByReference(ht,3)) { - php_error(E_WARNING,"return_status argument to exec() not passed by reference"); - } ret = php_Exec(2,Z_STRVAL_PP(arg1),*arg2,return_value); Z_TYPE_PP(arg3) = IS_LONG; Z_LVAL_PP(arg3)=ret; @@ -288,9 +279,6 @@ ret = php_Exec(1, Z_STRVAL_PP(arg1), NULL,return_value); break; case 2: - if (!ParameterPassedByReference(ht,2)) { - php_error(E_WARNING,"return_status argument to system() not passed by reference"); - } ret = php_Exec(1, Z_STRVAL_PP(arg1), NULL,return_value); Z_TYPE_PP(arg2) = IS_LONG; Z_LVAL_PP(arg2)=ret; @@ -315,9 +303,6 @@ ret = php_Exec(3, Z_STRVAL_PP(arg1), NULL,return_value); break; case 2: - if (!ParameterPassedByReference(ht,2)) { - php_error(E_WARNING,"return_status argument to system() not passed by reference"); - } ret = php_Exec(3, Z_STRVAL_PP(arg1), NULL,return_value); Z_TYPE_PP(arg2) = IS_LONG; Z_LVAL_PP(arg2)=ret; Index: php4/ext/standard/image.c diff -u php4/ext/standard/image.c:1.34 php4/ext/standard/image.c:1.35 --- php4/ext/standard/image.c:1.34 Wed Jun 6 09:05:51 2001 +++ php4/ext/standard/image.c Mon Jul 30 01:36:14 2001 @@ -15,7 +15,7 @@ | Authors: Rasmus Lerdorf | +----------------------------------------------------------------------+ */ -/* $Id: image.c,v 1.34 2001/06/06 13:05:51 rasmus Exp $ */ +/* $Id: image.c,v 1.35 2001/07/30 05:36:14 zeev Exp $ */ /* * Based on Daniel Schmitt's imageinfo.c which carried the following * Copyright notice. @@ -422,11 +422,6 @@ if (zend_get_parameters_ex(2, &arg1, &info) == FAILURE) { WRONG_PARAM_COUNT; } - if (!ParameterPassedByReference(ht, 2)) { - php_error(E_WARNING, "Array to be filled with values must be passed by reference."); - RETURN_FALSE; - } - zval_dtor(*info); if (array_init(*info) == FAILURE) { Index: php4/ext/standard/reg.c diff -u php4/ext/standard/reg.c:1.45 php4/ext/standard/reg.c:1.46 --- php4/ext/standard/reg.c:1.45 Sat Jul 28 07:36:18 2001 +++ php4/ext/standard/reg.c Mon Jul 30 01:36:15 2001 @@ -17,7 +17,7 @@ | Jaakko Hyvätti <jaakko@hyvatti.iki.fi> | +----------------------------------------------------------------------+ */ -/* $Id: reg.c,v 1.45 2001/07/28 11:36:18 zeev Exp $ */ +/* $Id: reg.c,v 1.46 2001/07/30 05:36:15 zeev Exp $ */ #include <stdio.h> #include "php.h" @@ -193,10 +193,6 @@ case 3: if (zend_get_parameters_ex(3, ®ex, &findin, &array) == FAILURE) { WRONG_PARAM_COUNT; - } - if (!ParameterPassedByReference(ht, 3)) { - php_error(E_WARNING, "Array to be filled with values must be passed by reference."); - RETURN_FALSE; } break; default: Index: php4/ext/yaz/php_yaz.c diff -u php4/ext/yaz/php_yaz.c:1.23 php4/ext/yaz/php_yaz.c:1.24 --- php4/ext/yaz/php_yaz.c:1.23 Thu Jul 19 09:27:56 2001 +++ php4/ext/yaz/php_yaz.c Mon Jul 30 01:36:15 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_yaz.c,v 1.23 2001/07/19 13:27:56 dickmeiss Exp $ */ +/* $Id: php_yaz.c,v 1.24 2001/07/30 05:36:15 zeev Exp $ */ #include "php.h" @@ -2188,10 +2188,6 @@ { WRONG_PARAM_COUNT; } - if (!ParameterPassedByReference(ht, 2)) - { - WRONG_PARAM_COUNT; - } } else if (ZEND_NUM_ARGS() == 1) { @@ -2325,10 +2321,6 @@ WRONG_PARAM_COUNT; } - if (!ParameterPassedByReference(ht, 3)) { - php_error(E_WARNING, "Third argument must be passed by reference."); - RETURN_FALSE; - } pval_destructor(*pval_res); if (array_init(*pval_res) == FAILURE) {