Skip to content

Commit f60cf0c

Browse files
committed
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.
1 parent 3804858 commit f60cf0c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

UPGRADING.INTERNALS

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ PHP 8.0 INTERNALS UPGRADE NOTES
7171
Instead type checks should be performed using the zend_parse_parameters()
7272
or ZEND_PARSE_PARAMETERS_*() APIs.
7373

74-
g. zend_free_op type and "should_free" argument of zend_get_zval_ptr() were
75-
removed. It's possible to get the old "should_free" value using the
76-
following code.
74+
g. The zend_free_op type and the "should_free" and "type" arguments of
75+
zend_get_zval_ptr() were removed. It's possible to get the old
76+
"should_free" value using the following code:
7777

78-
zval *ret = zend_get_zval_ptr(opline, opline->op1_type, &opline->op1,
79-
execute_data, BP_VAR_R);
80-
zval *should_free = (op_type & (IS_TMP_VAR|IS_VAR)) ? ret : NULL;
78+
zval *ret = zend_get_zval_ptr(
79+
opline, opline->op1_type, &opline->op1, execute_data);
80+
zval *should_free = (op_type & (IS_TMP_VAR|IS_VAR)) ? ret : NULL;
8181

8282
h. Added the zend_value_error() function, which is intended to be used
8383
to raise ValueError when inappropriate argument values are passed

Zend/zend_execute.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4551,7 +4551,7 @@ ZEND_API user_opcode_handler_t zend_get_user_opcode_handler(zend_uchar opcode)
45514551
return zend_user_opcode_handlers[opcode];
45524552
}
45534553

4554-
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)
4554+
ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data)
45554555
{
45564556
zval *ret;
45574557

Zend/zend_execute.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ ZEND_API zval* zend_get_compiled_variable_value(const zend_execute_data *execute
327327
ZEND_API int zend_set_user_opcode_handler(zend_uchar opcode, user_opcode_handler_t handler);
328328
ZEND_API user_opcode_handler_t zend_get_user_opcode_handler(zend_uchar opcode);
329329

330-
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);
330+
ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data);
331331

332332
ZEND_API void zend_clean_and_cache_symbol_table(zend_array *symbol_table);
333333
ZEND_API void zend_free_compiled_variables(zend_execute_data *execute_data);

0 commit comments

Comments
 (0)