From a8eb399ca3e38beaf4a0bb12eac54821cd2ed19f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Jan 2023 16:41:11 +0100 Subject: [PATCH] Zend/zend_operators: make several pointers const --- Zend/zend_operators.c | 4 ++-- Zend/zend_operators.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 9af1a6b4756..afe068bfeb8 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -2614,13 +2614,13 @@ try_again: } /* }}} */ -ZEND_API int ZEND_FASTCALL zend_is_true(zval *op) /* {{{ */ +ZEND_API int ZEND_FASTCALL zend_is_true(const zval *op) /* {{{ */ { return (int) i_zend_is_true(op); } /* }}} */ -ZEND_API bool ZEND_FASTCALL zend_object_is_true(zval *op) /* {{{ */ +ZEND_API bool ZEND_FASTCALL zend_object_is_true(const zval *op) /* {{{ */ { zend_object *zobj = Z_OBJ_P(op); zval tmp; diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 0fc503f2c12..506c27fc50e 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -349,13 +349,13 @@ static zend_always_inline bool try_convert_to_string(zval *op) { #define convert_to_string(op) if (Z_TYPE_P(op) != IS_STRING) { _convert_to_string((op)); } -ZEND_API int ZEND_FASTCALL zend_is_true(zval *op); -ZEND_API bool ZEND_FASTCALL zend_object_is_true(zval *op); +ZEND_API int ZEND_FASTCALL zend_is_true(const zval *op); +ZEND_API bool ZEND_FASTCALL zend_object_is_true(const zval *op); #define zval_is_true(op) \ zend_is_true(op) -static zend_always_inline bool i_zend_is_true(zval *op) +static zend_always_inline bool i_zend_is_true(const zval *op) { bool result = 0;