com php-src: Remove type argument from zend_get_zval_ptr : UPGRADING.INTERNALS Zend/zend_execute.c Zend/ze nd_execute.h
| From: | Nikita Popov | Date: | Wed, 15 Jul 2020 07:51:51 +0000 |
| Subject: | com php-src: Remove type argument from zend_get_zval_ptr : UPGRADING.INTERNALS Zend/zend_execute.c Zend/ze nd_execute.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-112172@lists.php.net to get a copy of this message | ||
Commit: f60cf0cfe7fd335718ba5c24bbd824f157e9ea49
Author: Nikita Popov <nikita.ppv@gmail.com> Wed, 15 Jul 2020 09:51:14 +0200
Parents: 3804858c47409c9a90935dd112663b94ea917658
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f60cf0cfe7fd335718ba5c24bbd824f157e9ea49
Log:
Remove type argument from zend_get_zval_ptr
As pointed out by Levi, this is unused, and we already changed
the signature of this function for PHP 8.
Changed paths:
M UPGRADING.INTERNALS
M Zend/zend_execute.c
M Zend/zend_execute.h
Diff:
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index 91bc8100aa..db249ea425 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -71,13 +71,13 @@ PHP 8.0 INTERNALS UPGRADE NOTES
Instead type checks should be performed using the zend_parse_parameters()
or ZEND_PARSE_PARAMETERS_*() APIs.
- g. zend_free_op type and "should_free" argument of zend_get_zval_ptr() were
- removed. It's possible to get the old "should_free" value using the
- following code.
+ g. The zend_free_op type and the "should_free" and "type" arguments of
+ zend_get_zval_ptr() were removed. It's possible to get the old
+ "should_free" value using the following code:
- zval *ret = zend_get_zval_ptr(opline, opline->op1_type, &opline->op1,
- execute_data, BP_VAR_R);
- zval *should_free = (op_type & (IS_TMP_VAR|IS_VAR)) ? ret : NULL;
+ zval *ret = zend_get_zval_ptr(
+ opline, opline->op1_type, &opline->op1, execute_data);
+ zval *should_free = (op_type & (IS_TMP_VAR|IS_VAR)) ? ret : NULL;
h. Added the zend_value_error() function, which is intended to be used
to raise ValueError when inappropriate argument values are passed
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index f2e7ba3d6e..b7dce3614c 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute..c
@@ -4551,7 +4551,7 @@ ZEND_API user_opcode_handler_t zend_get_user_opcode_handler(zend_uchar opcode)
return zend_user_opcode_handlers[opcode];
}
-ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const
zend_execute_data *execute_data, int type)
+ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const
zend_execute_data *execute_data)
{
zval *ret;
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index 84fd23e610..827b735c70 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -327,7 +327,7 @@ ZEND_API zval* zend_get_compiled_variable_value(const zend_execute_data *execute
ZEND_API int zend_set_user_opcode_handler(zend_uchar opcode, user_opcode_handler_t handler);
ZEND_API user_opcode_handler_t zend_get_user_opcode_handler(zend_uchar opcode);
-ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const
zend_execute_data *execute_data, int type);
+ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const
zend_execute_data *execute_data);
ZEND_API void zend_clean_and_cache_symbol_table(zend_array *symbol_table);
ZEND_API void zend_free_compiled_variables(zend_execute_data *execute_data);