@@ -312,7 +312,7 @@ static zend_class_entry *lookup_class(zend_class_entry *scope, zend_string *name
312312/* Instanceof that's safe to use on unlinked classes. */
313313static bool unlinked_instanceof (const zend_class_entry * ce1 , const zend_class_entry * ce2 ) {
314314 if (ce1 == ce2 ) {
315- return 1 ;
315+ return true ;
316316 }
317317
318318 if (ce1 -> ce_flags & ZEND_ACC_LINKED ) {
@@ -331,7 +331,7 @@ static bool unlinked_instanceof(const zend_class_entry *ce1, const zend_class_en
331331 /* It's not sufficient to only check the parent chain itself, as need to do a full
332332 * recursive instanceof in case the parent interfaces haven't been copied yet. */
333333 if (parent_ce && unlinked_instanceof (parent_ce , ce2 )) {
334- return 1 ;
334+ return true ;
335335 }
336336 }
337337
@@ -342,7 +342,7 @@ static bool unlinked_instanceof(const zend_class_entry *ce1, const zend_class_en
342342 * check here, as the parent interfaces might not have been fully copied yet. */
343343 for (i = 0 ; i < ce1 -> num_interfaces ; i ++ ) {
344344 if (unlinked_instanceof (ce1 -> interfaces [i ], ce2 )) {
345- return 1 ;
345+ return true ;
346346 }
347347 }
348348 } else {
@@ -352,19 +352,19 @@ static bool unlinked_instanceof(const zend_class_entry *ce1, const zend_class_en
352352 ZEND_FETCH_CLASS_ALLOW_UNLINKED | ZEND_FETCH_CLASS_NO_AUTOLOAD );
353353 /* Avoid recursing if class implements itself. */
354354 if (ce && ce != ce1 && unlinked_instanceof (ce , ce2 )) {
355- return 1 ;
355+ return true ;
356356 }
357357 }
358358 }
359359 }
360360
361- return 0 ;
361+ return false ;
362362}
363363
364364static bool zend_type_permits_self (
365365 const zend_type type , const zend_class_entry * scope , zend_class_entry * self ) {
366366 if (ZEND_TYPE_FULL_MASK (type ) & MAY_BE_OBJECT ) {
367- return 1 ;
367+ return true ;
368368 }
369369
370370 /* Any types that may satisfy self must have already been loaded at this point
@@ -376,11 +376,11 @@ static bool zend_type_permits_self(
376376 zend_string * name = resolve_class_name (scope , ZEND_TYPE_NAME (* single_type ));
377377 const zend_class_entry * ce = lookup_class (self , name );
378378 if (ce && unlinked_instanceof (self , ce )) {
379- return 1 ;
379+ return true ;
380380 }
381381 }
382382 } ZEND_TYPE_FOREACH_END ();
383- return 0 ;
383+ return false ;
384384}
385385
386386static void track_class_dependency (zend_class_entry * ce , zend_string * class_name )
0 commit comments