1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Zend/zend_operators: make several pointers const

This commit is contained in:
Max Kellermann
2023-01-03 16:41:11 +01:00
committed by George Peter Banyard
parent d53ad4b566
commit a8eb399ca3
2 changed files with 5 additions and 5 deletions

View File

@@ -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;

View File

@@ -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;