]> granicus.if.org Git - php/commitdiff
Remove type argument from zend_get_zval_ptr
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 15 Jul 2020 07:51:14 +0000 (09:51 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 15 Jul 2020 07:51:51 +0000 (09:51 +0200)
As pointed out by Levi, this is unused, and we already changed
the signature of this function for PHP 8.

UPGRADING.INTERNALS
Zend/zend_execute.c
Zend/zend_execute.h

index 91bc8100aaaf776d55835f68459be981e36aaf49..db249ea42578395002cc4dd8a484ef40c794a103 100644 (file)
@@ -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
index f2e7ba3d6e43465b3c4d59d49d35e4edeb0928a5..b7dce3614cb614a380e4ae59b72d7bd33fad7175 100644 (file)
@@ -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;
 
index 84fd23e610995fb933351ca85cd8651d2d1023de..827b735c705e2de6d21efa70252a25952adf1832 100644 (file)
@@ -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);