Skip to content

Commit 021babd

Browse files
committed
Partial revert of 'Shot in the dark to fix JIT'
1 parent 657d2da commit 021babd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Zend/zend_operators.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2524,21 +2524,21 @@ ZEND_API zend_result ZEND_FASTCALL decrement_function(zval *op1) /* {{{ */
25242524
}
25252525
/* }}} */
25262526

2527-
ZEND_API int ZEND_FASTCALL zend_is_true(zval *op) /* {{{ */
2527+
ZEND_API bool ZEND_FASTCALL zend_is_true(zval *op) /* {{{ */
25282528
{
25292529
return i_zend_is_true(op);
25302530
}
25312531
/* }}} */
25322532

2533-
ZEND_API int ZEND_FASTCALL zend_object_is_true(zval *op) /* {{{ */
2533+
ZEND_API bool ZEND_FASTCALL zend_object_is_true(zval *op) /* {{{ */
25342534
{
25352535
zend_object *zobj = Z_OBJ_P(op);
25362536
zval tmp;
25372537
if (zobj->handlers->cast_object(zobj, &tmp, _IS_BOOL) == SUCCESS) {
25382538
return Z_TYPE(tmp) == IS_TRUE;
25392539
}
25402540
zend_error(E_RECOVERABLE_ERROR, "Object of class %s could not be converted to bool", ZSTR_VAL(zobj->ce->name));
2541-
return 1;
2541+
return false;
25422542
}
25432543
/* }}} */
25442544

Zend/zend_operators.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,8 @@ static zend_always_inline zend_bool try_convert_to_string(zval *op) {
341341
#define convert_to_string(op) if (Z_TYPE_P(op) != IS_STRING) { _convert_to_string((op)); }
342342

343343

344-
ZEND_API int ZEND_FASTCALL zend_is_true(zval *op);
345-
ZEND_API int ZEND_FASTCALL zend_object_is_true(zval *op);
344+
ZEND_API bool ZEND_FASTCALL zend_is_true(zval *op);
345+
ZEND_API bool ZEND_FASTCALL zend_object_is_true(zval *op);
346346

347347
#define zval_is_true(op) \
348348
zend_is_true(op)

0 commit comments

Comments
 (0)