diff options
author | Nikita Popov <nikic@php.net> | 2013-09-26 18:39:17 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2013-09-26 18:39:17 +0200 |
commit | 0d7a6388663b76ebed6585ac92dfca5ef65fa7af (patch) | |
tree | 1317a8a47c0e4bd1193c8fbf705d91ae75140f78 /UPGRADING.INTERNALS | |
parent | 6daa04a4f606f8121d9f1ea6cd90c1c8a684500e (diff) | |
download | php-git-0d7a6388663b76ebed6585ac92dfca5ef65fa7af.tar.gz |
Implement variadic function syntax
As per RFC: https://wiki.php.net/rfc/variadics
Diffstat (limited to 'UPGRADING.INTERNALS')
-rw-r--r-- | UPGRADING.INTERNALS | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 90202f00f0..d1aca29dc4 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -6,6 +6,7 @@ UPGRADE NOTES - PHP X.Y a. Addition of do_operation and compare object handlers b. return_value_ptr now always available, RETVAL_ZVAL_FAST macros c. POST data handling + d. Arginfo changes 2. Build system changes a. Unix build system changes @@ -68,6 +69,47 @@ UPGRADE NOTES - PHP X.Y The recommended way to access raw POST data is to open and use a php://input stream wrapper. It is safe to be used concurrently and more than once. + d. Arginfo changes + + The pass_rest_by_reference argument of the ZEND_BEGIN_ARG_INFO and + ZEND_BEGIN_ARG_INFO_EX() is no longer used. The value passed to it is ignored. + + Instead a variadic argument is created using ZEND_ARG_VARIADIC_INFO(): + + ZEND_ARG_VARIADIC_INFO(0, name) /* pass rest by value */ + ZEND_ARG_VARIADIC_INFO(1, name) /* pass rest by reference */ + ZEND_ARG_VARIADIC_INFO(ZEND_SEND_PREFER_REF, name) + /* pass rest by prefer-ref */ + + ZEND_ARG_VARIADIC_INFO() should only be used for the last argument. + + The following changes were applied to the zend_arg_info struct: + + typedef struct _zend_arg_info { + const char *class_name; + zend_uint class_name_len; + zend_uchar type_hint; + + zend_uchar pass_by_reference; + zend_bool allow_null; + - zend_bool pass_by_reference; + + zend_bool is_variadic; + } zend_arg_info; + + The following changes were applied to the zend_internal_function_info struct: + + typedef struct _zend_internal_function_info { + zend_uint required_num_args; + zend_uchar _type_hint; + zend_bool return_reference; + - zend_bool pass_rest_by_reference; + + zend_bool _allow_null; + + zend_bool _is_variadic; + } zend_internal_function_info; + + The CHECK_ARG_SEND_TYPE(), ARG_MUST_BE_SENT_BY_REF(), + ARG_SHOULD_BE_SENT_BY_REF() and ARG_MAY_BE_SENT_BY_REF() macros now assume + that the argument passed to them is a zend_function* and that it is non-NULL. + ======================== 2. Build system changes ======================== |