summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-07-15 09:51:14 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-07-15 09:51:51 +0200
commitf60cf0cfe7fd335718ba5c24bbd824f157e9ea49 (patch)
tree369755971adea3aeb18b8371989848f9bbb6105e
parent3804858c47409c9a90935dd112663b94ea917658 (diff)
downloadphp-git-f60cf0cfe7fd335718ba5c24bbd824f157e9ea49.tar.gz
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.
-rw-r--r--UPGRADING.INTERNALS12
-rw-r--r--Zend/zend_execute.c2
-rw-r--r--Zend/zend_execute.h2
3 files changed, 8 insertions, 8 deletions
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);