Skip to content

Commit 1bc92af

Browse files
committed
Update zend_API.c
1 parent 6d62d87 commit 1bc92af

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Zend/zend_API.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3825,7 +3825,7 @@ static zend_always_inline bool zend_is_callable_check_func(const zval *callable,
38253825
}
38263826
if (EXPECTED(func != NULL)) {
38273827
fcc->function_handler = func;
3828-
return 1;
3828+
return true;
38293829
}
38303830
}
38313831

@@ -4126,7 +4126,7 @@ ZEND_API bool zend_is_callable_at_frame(
41264126

41274127
if (check_flags & IS_CALLABLE_CHECK_SYNTAX_ONLY) {
41284128
fcc->called_scope = fcc->calling_scope;
4129-
return 1;
4129+
return true;
41304130
}
41314131

41324132
check_func:
@@ -4140,26 +4140,26 @@ ZEND_API bool zend_is_callable_at_frame(
41404140
{
41414141
if (zend_hash_num_elements(Z_ARRVAL_P(callable)) != 2) {
41424142
if (error) *error = estrdup("array callback must have exactly two members");
4143-
return 0;
4143+
return false;
41444144
}
41454145

41464146
zval *obj = zend_hash_index_find(Z_ARRVAL_P(callable), 0);
41474147
zval *method = zend_hash_index_find(Z_ARRVAL_P(callable), 1);
41484148
if (!obj || !method) {
41494149
if (error) *error = estrdup("array callback has to contain indices 0 and 1");
4150-
return 0;
4150+
return false;
41514151
}
41524152

41534153
ZVAL_DEREF(obj);
41544154
if (Z_TYPE_P(obj) != IS_STRING && Z_TYPE_P(obj) != IS_OBJECT) {
41554155
if (error) *error = estrdup("first array member is not a valid class name or object");
4156-
return 0;
4156+
return false;
41574157
}
41584158

41594159
ZVAL_DEREF(method);
41604160
if (Z_TYPE_P(method) != IS_STRING) {
41614161
if (error) *error = estrdup("second array member is not a valid method");
4162-
return 0;
4162+
return false;
41634163
}
41644164

41654165
if (Z_TYPE_P(obj) == IS_STRING) {
@@ -4192,16 +4192,16 @@ ZEND_API bool zend_is_callable_at_frame(
41924192
if (fcc == &fcc_local) {
41934193
zend_release_fcall_info_cache(fcc);
41944194
}
4195-
return 1;
4195+
return true;
41964196
}
41974197
if (error) *error = estrdup("no array or string given");
4198-
return 0;
4198+
return false;
41994199
case IS_REFERENCE:
42004200
callable = Z_REFVAL_P(callable);
42014201
goto again;
42024202
default:
42034203
if (error) *error = estrdup("no array or string given");
4204-
return 0;
4204+
return false;
42054205
}
42064206
}
42074207
/* }}} */
@@ -5187,11 +5187,11 @@ ZEND_API bool zend_is_iterable(const zval *iterable) /* {{{ */
51875187
{
51885188
switch (Z_TYPE_P(iterable)) {
51895189
case IS_ARRAY:
5190-
return 1;
5190+
return true;
51915191
case IS_OBJECT:
51925192
return zend_class_implements_interface(Z_OBJCE_P(iterable), zend_ce_traversable);
51935193
default:
5194-
return 0;
5194+
return false;
51955195
}
51965196
}
51975197
/* }}} */
@@ -5200,15 +5200,15 @@ ZEND_API bool zend_is_countable(const zval *countable) /* {{{ */
52005200
{
52015201
switch (Z_TYPE_P(countable)) {
52025202
case IS_ARRAY:
5203-
return 1;
5203+
return true;
52045204
case IS_OBJECT:
52055205
if (Z_OBJ_HT_P(countable)->count_elements) {
5206-
return 1;
5206+
return true;
52075207
}
52085208

52095209
return zend_class_implements_interface(Z_OBJCE_P(countable), zend_ce_countable);
52105210
default:
5211-
return 0;
5211+
return false;
52125212
}
52135213
}
52145214
/* }}} */

0 commit comments

Comments
 (0)