@@ -45,10 +45,12 @@ ZEND_API zend_class_entry *zend_ce_division_by_zero_error;
4545ZEND_API zend_class_entry * zend_ce_unhandled_match_error ;
4646
4747/* Internal pseudo-exception that is not exposed to userland. Throwing this exception *does not* execute finally blocks. */
48- static zend_class_entry zend_ce_unwind_exit ;
48+ static zend_class_entry_storage zend_ces_unwind_exit ;
49+ #define zend_ce_unwind_exit ZEND_CES_TO_CE(zend_ces_unwind_exit)
4950
5051/* Internal pseudo-exception that is not exposed to userland. Throwing this exception *does* execute finally blocks. */
51- static zend_class_entry zend_ce_graceful_exit ;
52+ static zend_class_entry_storage zend_ces_graceful_exit ;
53+ #define zend_ce_graceful_exit ZEND_CES_TO_CE(zend_ces_graceful_exit)
5254
5355ZEND_API void (* zend_throw_exception_hook )(zend_object * ex );
5456
@@ -795,9 +797,11 @@ void zend_register_default_exception(void) /* {{{ */
795797 zend_ce_unhandled_match_error = register_class_UnhandledMatchError (zend_ce_error );
796798 zend_init_exception_class_entry (zend_ce_unhandled_match_error );
797799
798- INIT_CLASS_ENTRY (zend_ce_unwind_exit , "UnwindExit" , NULL );
800+ INIT_CLASS_ENTRY ((* zend_ce_unwind_exit ), "UnwindExit" , NULL );
801+ zend_init_class_entry_header (& zend_ces_unwind_exit );
799802
800- INIT_CLASS_ENTRY (zend_ce_graceful_exit , "GracefulExit" , NULL );
803+ INIT_CLASS_ENTRY ((* zend_ce_graceful_exit ), "GracefulExit" , NULL );
804+ zend_init_class_entry_header (& zend_ces_graceful_exit );
801805}
802806/* }}} */
803807
@@ -958,7 +962,7 @@ ZEND_API ZEND_COLD zend_result zend_exception_error(zend_object *ex, int severit
958962
959963 zend_string_release_ex (str , 0 );
960964 zend_string_release_ex (file , 0 );
961- } else if (ce_exception == & zend_ce_unwind_exit || ce_exception == & zend_ce_graceful_exit ) {
965+ } else if (ce_exception == zend_ce_unwind_exit || ce_exception == zend_ce_graceful_exit ) {
962966 /* We successfully unwound, nothing more to do.
963967 * We still return FAILURE in this case, as further execution should still be aborted. */
964968 } else {
@@ -1006,12 +1010,12 @@ ZEND_API ZEND_COLD void zend_throw_exception_object(zval *exception) /* {{{ */
10061010
10071011ZEND_API ZEND_COLD zend_object * zend_create_unwind_exit (void )
10081012{
1009- return zend_objects_new (& zend_ce_unwind_exit );
1013+ return zend_objects_new (zend_ce_unwind_exit );
10101014}
10111015
10121016ZEND_API ZEND_COLD zend_object * zend_create_graceful_exit (void )
10131017{
1014- return zend_objects_new (& zend_ce_graceful_exit );
1018+ return zend_objects_new (zend_ce_graceful_exit );
10151019}
10161020
10171021ZEND_API ZEND_COLD void zend_throw_unwind_exit (void )
@@ -1032,10 +1036,10 @@ ZEND_API ZEND_COLD void zend_throw_graceful_exit(void)
10321036
10331037ZEND_API bool zend_is_unwind_exit (const zend_object * ex )
10341038{
1035- return OBJ_CE ( ex ) == & zend_ce_unwind_exit ;
1039+ return ex -> cr == ( zend_class_reference * ) & zend_ces_unwind_exit ;
10361040}
10371041
10381042ZEND_API bool zend_is_graceful_exit (const zend_object * ex )
10391043{
1040- return OBJ_CE ( ex ) == & zend_ce_graceful_exit ;
1044+ return ex -> cr == ( zend_class_reference * ) & zend_ces_graceful_exit ;
10411045}
0 commit comments