Skip to content

Commit

Permalink
Remove type argument from zend_get_zval_ptr
Browse files Browse the repository at this point in the history
As pointed out by Levi, this is unused, and we already changed
the signature of this function for PHP 8.
  • Loading branch information
nikic committed Jul 15, 2020
1 parent 3804858 commit f60cf0c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_execute.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_execute.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f60cf0c

Please sign in to comment.