Skip to content

Commit a8eb399

Browse files
MaxKellermannGirgias
authored andcommittedJan 4, 2023
Zend/zend_operators: make several pointers const
1 parent d53ad4b commit a8eb399

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎Zend/zend_operators.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2614,13 +2614,13 @@ ZEND_API zend_result ZEND_FASTCALL decrement_function(zval *op1) /* {{{ */
26142614
}
26152615
/* }}} */
26162616

2617-
ZEND_API int ZEND_FASTCALL zend_is_true(zval *op) /* {{{ */
2617+
ZEND_API int ZEND_FASTCALL zend_is_true(const zval *op) /* {{{ */
26182618
{
26192619
return (int) i_zend_is_true(op);
26202620
}
26212621
/* }}} */
26222622

2623-
ZEND_API bool ZEND_FASTCALL zend_object_is_true(zval *op) /* {{{ */
2623+
ZEND_API bool ZEND_FASTCALL zend_object_is_true(const zval *op) /* {{{ */
26242624
{
26252625
zend_object *zobj = Z_OBJ_P(op);
26262626
zval tmp;

‎Zend/zend_operators.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,13 @@ static zend_always_inline bool try_convert_to_string(zval *op) {
349349
#define convert_to_string(op) if (Z_TYPE_P(op) != IS_STRING) { _convert_to_string((op)); }
350350

351351

352-
ZEND_API int ZEND_FASTCALL zend_is_true(zval *op);
353-
ZEND_API bool ZEND_FASTCALL zend_object_is_true(zval *op);
352+
ZEND_API int ZEND_FASTCALL zend_is_true(const zval *op);
353+
ZEND_API bool ZEND_FASTCALL zend_object_is_true(const zval *op);
354354

355355
#define zval_is_true(op) \
356356
zend_is_true(op)
357357

358-
static zend_always_inline bool i_zend_is_true(zval *op)
358+
static zend_always_inline bool i_zend_is_true(const zval *op)
359359
{
360360
bool result = 0;
361361

0 commit comments

Comments
 (0)