@@ -93,9 +93,9 @@ static zend_object_value zend_default_exception_new_ex(zend_class_entry *class_t
9393 trace -> refcount = 0 ;
9494 zend_fetch_debug_backtrace (trace , skip_top_traces , 0 TSRMLS_CC );
9595
96- zend_update_property_rt_string (U_CLASS_ENTRY ( default_exception_ce ) , & obj , "file" , sizeof ("file" )- 1 , zend_get_executed_filename (TSRMLS_C ) TSRMLS_CC );
97- zend_update_property_long (U_CLASS_ENTRY ( default_exception_ce ) , & obj , "line" , sizeof ("line" )- 1 , zend_get_executed_lineno (TSRMLS_C ) TSRMLS_CC );
98- zend_update_property (U_CLASS_ENTRY ( default_exception_ce ) , & obj , "trace" , sizeof ("trace" )- 1 , trace TSRMLS_CC );
96+ zend_update_property_rt_string (default_exception_ce , & obj , "file" , sizeof ("file" )- 1 , zend_get_executed_filename (TSRMLS_C ) TSRMLS_CC );
97+ zend_update_property_long (default_exception_ce , & obj , "line" , sizeof ("line" )- 1 , zend_get_executed_lineno (TSRMLS_C ) TSRMLS_CC );
98+ zend_update_property (default_exception_ce , & obj , "trace" , sizeof ("trace" )- 1 , trace TSRMLS_CC );
9999
100100 return obj .value .obj ;
101101}
@@ -139,22 +139,22 @@ ZEND_METHOD(exception, __construct)
139139
140140 if (message ) {
141141 if (message_type == IS_UNICODE ) {
142- zend_update_property_unicodel (U_CLASS_ENTRY ( default_exception_ce ) , object , "message" , sizeof ("message" )- 1 , message , message_len TSRMLS_CC );
142+ zend_update_property_unicodel (default_exception_ce , object , "message" , sizeof ("message" )- 1 , message , message_len TSRMLS_CC );
143143 } else if (UG (unicode )) {
144144 UErrorCode status = U_ZERO_ERROR ;
145145 UChar * u_str ;
146146 int32_t u_len ;
147147
148148 zend_convert_to_unicode (ZEND_U_CONVERTER (UG (runtime_encoding_conv )), & u_str , & u_len , message , message_len , & status );
149- zend_update_property_unicodel (U_CLASS_ENTRY ( default_exception_ce ) , object , "message" , sizeof ("message" )- 1 , u_str , u_len TSRMLS_CC );
149+ zend_update_property_unicodel (default_exception_ce , object , "message" , sizeof ("message" )- 1 , u_str , u_len TSRMLS_CC );
150150 efree (u_str );
151151 } else {
152- zend_update_property_stringl (U_CLASS_ENTRY ( default_exception_ce ) , object , "message" , sizeof ("message" )- 1 , message , message_len TSRMLS_CC );
152+ zend_update_property_stringl (default_exception_ce , object , "message" , sizeof ("message" )- 1 , message , message_len TSRMLS_CC );
153153 }
154154 }
155155
156156 if (code ) {
157- zend_update_property_long (U_CLASS_ENTRY ( default_exception_ce ) , object , "code" , sizeof ("code" )- 1 , code TSRMLS_CC );
157+ zend_update_property_long (default_exception_ce , object , "code" , sizeof ("code" )- 1 , code TSRMLS_CC );
158158 }
159159}
160160/* }}} */
@@ -178,36 +178,36 @@ ZEND_METHOD(error_exception, __construct)
178178
179179 if (message ) {
180180 if (message_type == IS_UNICODE ) {
181- zend_update_property_unicodel (U_CLASS_ENTRY ( default_exception_ce ) , object , "message" , sizeof ("message" )- 1 , message , message_len TSRMLS_CC );
181+ zend_update_property_unicodel (default_exception_ce , object , "message" , sizeof ("message" )- 1 , message , message_len TSRMLS_CC );
182182 } else if (UG (unicode )) {
183183 UErrorCode status = U_ZERO_ERROR ;
184184 UChar * u_str ;
185185 int32_t u_len ;
186186
187187 zend_convert_to_unicode (ZEND_U_CONVERTER (UG (runtime_encoding_conv )), & u_str , & u_len , message , message_len , & status );
188- zend_update_property_unicodel (U_CLASS_ENTRY ( default_exception_ce ) , object , "message" , sizeof ("message" )- 1 , u_str , u_len TSRMLS_CC );
188+ zend_update_property_unicodel (default_exception_ce , object , "message" , sizeof ("message" )- 1 , u_str , u_len TSRMLS_CC );
189189 efree (u_str );
190190 } else {
191- zend_update_property_stringl (U_CLASS_ENTRY ( default_exception_ce ) , object , "message" , sizeof ("message" )- 1 , message , message_len TSRMLS_CC );
191+ zend_update_property_stringl (default_exception_ce , object , "message" , sizeof ("message" )- 1 , message , message_len TSRMLS_CC );
192192 }
193193 }
194194
195195 if (code ) {
196- zend_update_property_long (U_CLASS_ENTRY ( default_exception_ce ) , object , "code" , sizeof ("code" )- 1 , code TSRMLS_CC );
196+ zend_update_property_long (default_exception_ce , object , "code" , sizeof ("code" )- 1 , code TSRMLS_CC );
197197 }
198198
199- zend_update_property_long (U_CLASS_ENTRY ( default_exception_ce ) , object , "severity" , sizeof ("severity" )- 1 , severity TSRMLS_CC );
199+ zend_update_property_long (default_exception_ce , object , "severity" , sizeof ("severity" )- 1 , severity TSRMLS_CC );
200200
201201 if (argc >= 4 ) {
202202 if (file_type == IS_UNICODE ) {
203- zend_update_property_unicodel (U_CLASS_ENTRY ( default_exception_ce ) , object , "file" , sizeof ("file" )- 1 , filename , filename_len TSRMLS_CC );
203+ zend_update_property_unicodel (default_exception_ce , object , "file" , sizeof ("file" )- 1 , filename , filename_len TSRMLS_CC );
204204 } else {
205- zend_update_property_stringl (U_CLASS_ENTRY ( default_exception_ce ) , object , "file" , sizeof ("file" )- 1 , filename , filename_len TSRMLS_CC );
205+ zend_update_property_stringl (default_exception_ce , object , "file" , sizeof ("file" )- 1 , filename , filename_len TSRMLS_CC );
206206 }
207207 if (argc < 5 ) {
208208 lineno = 0 ; /* invalidate lineno */
209209 }
210- zend_update_property_long (U_CLASS_ENTRY ( default_exception_ce ) , object , "line" , sizeof ("line" )- 1 , lineno TSRMLS_CC );
210+ zend_update_property_long (default_exception_ce , object , "line" , sizeof ("line" )- 1 , lineno TSRMLS_CC );
211211 }
212212}
213213/* }}} */
@@ -221,7 +221,7 @@ static void _default_exception_get_entry(zval *object, char *name, int name_len,
221221{
222222 zval * value ;
223223
224- value = zend_read_property (U_CLASS_ENTRY ( default_exception_ce ) , object , name , name_len , 0 TSRMLS_CC );
224+ value = zend_read_property (default_exception_ce , object , name , name_len , 0 TSRMLS_CC );
225225
226226 * return_value = * value ;
227227 zval_copy_ctor (return_value );
@@ -524,7 +524,7 @@ ZEND_METHOD(exception, getTraceAsString)
524524 char * res = estrdup ("" ), * * str = & res , * s_tmp ;
525525 int res_len = 0 , * len = & res_len , num = 0 ;
526526
527- trace = zend_read_property (U_CLASS_ENTRY ( default_exception_ce ) , getThis (), "trace" , sizeof ("trace" )- 1 , 1 TSRMLS_CC );
527+ trace = zend_read_property (default_exception_ce , getThis (), "trace" , sizeof ("trace" )- 1 , 1 TSRMLS_CC );
528528 zend_hash_apply_with_arguments (Z_ARRVAL_P (trace ), (apply_func_args_t )_build_trace_string , 3 , str , len , & num );
529529
530530 s_tmp = emalloc (1 + MAX_LENGTH_OF_LONG + 7 + 1 );
@@ -596,7 +596,7 @@ ZEND_METHOD(exception, __toString)
596596
597597 /* We store the result in the private property string so we can access
598598 * the result in uncaught exception handlers without memleaks. */
599- zend_update_property_string (U_CLASS_ENTRY ( default_exception_ce ) , getThis (), "string" , sizeof ("string" )- 1 , str TSRMLS_CC );
599+ zend_update_property_string (default_exception_ce , getThis (), "string" , sizeof ("string" )- 1 , str TSRMLS_CC );
600600
601601 if (trace ) {
602602 zval_ptr_dtor (& trace );
@@ -678,12 +678,12 @@ void zend_register_default_exception(TSRMLS_D)
678678
679679ZEND_API zend_class_entry * zend_exception_get_default (TSRMLS_D )
680680{
681- return U_CLASS_ENTRY ( default_exception_ce ) ;
681+ return default_exception_ce ;
682682}
683683
684684ZEND_API zend_class_entry * zend_get_error_exception (TSRMLS_D )
685685{
686- return U_CLASS_ENTRY ( error_exception_ce ) ;
686+ return error_exception_ce ;
687687}
688688
689689
@@ -693,21 +693,21 @@ ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, char *messa
693693
694694 MAKE_STD_ZVAL (ex );
695695 if (exception_ce ) {
696- if (!instanceof_function (exception_ce , U_CLASS_ENTRY ( default_exception_ce ) TSRMLS_CC )) {
696+ if (!instanceof_function (exception_ce , default_exception_ce TSRMLS_CC )) {
697697 zend_error (E_NOTICE , "Exceptions must be derived from the Exception base class" );
698- exception_ce = U_CLASS_ENTRY ( default_exception_ce ) ;
698+ exception_ce = default_exception_ce ;
699699 }
700700 } else {
701- exception_ce = U_CLASS_ENTRY ( default_exception_ce ) ;
701+ exception_ce = default_exception_ce ;
702702 }
703703 object_init_ex (ex , exception_ce );
704704
705705
706706 if (message ) {
707- zend_update_property_rt_string (U_CLASS_ENTRY ( default_exception_ce ) , ex , "message" , sizeof ("message" )- 1 , message TSRMLS_CC );
707+ zend_update_property_rt_string (default_exception_ce , ex , "message" , sizeof ("message" )- 1 , message TSRMLS_CC );
708708 }
709709 if (code ) {
710- zend_update_property_long (U_CLASS_ENTRY ( default_exception_ce ) , ex , "code" , sizeof ("code" )- 1 , code TSRMLS_CC );
710+ zend_update_property_long (default_exception_ce , ex , "code" , sizeof ("code" )- 1 , code TSRMLS_CC );
711711 }
712712
713713 zend_throw_exception_internal (ex TSRMLS_CC );
@@ -733,7 +733,7 @@ ZEND_API zval * zend_throw_exception_ex(zend_class_entry *exception_ce, long cod
733733ZEND_API zval * zend_throw_error_exception (zend_class_entry * exception_ce , char * message , long code , int severity TSRMLS_DC )
734734{
735735 zval * ex = zend_throw_exception (exception_ce , message , code TSRMLS_CC );
736- zend_update_property_long (U_CLASS_ENTRY ( default_exception_ce ) , ex , "severity" , sizeof ("severity" )- 1 , severity TSRMLS_CC );
736+ zend_update_property_long (default_exception_ce , ex , "severity" , sizeof ("severity" )- 1 , severity TSRMLS_CC );
737737 return ex ;
738738}
739739
@@ -750,7 +750,7 @@ static void zend_error_va(int type, const char *file, uint lineno, const char *f
750750ZEND_API void zend_exception_error (zval * exception TSRMLS_DC )
751751{
752752 zend_class_entry * ce_exception = Z_OBJCE_P (exception );
753- if (instanceof_function (ce_exception , U_CLASS_ENTRY ( default_exception_ce ) TSRMLS_CC )) {
753+ if (instanceof_function (ce_exception , default_exception_ce TSRMLS_CC )) {
754754 zval * str , * file , * line ;
755755
756756 EG (exception ) = NULL ;
@@ -760,26 +760,26 @@ ZEND_API void zend_exception_error(zval *exception TSRMLS_DC)
760760 if (Z_TYPE_P (str ) != IS_STRING ) {
761761 zend_error (E_WARNING , "%v::__toString() must return a string" , ce_exception -> name );
762762 } else {
763- zend_update_property_string (U_CLASS_ENTRY ( default_exception_ce ) , exception , "string" , sizeof ("string" )- 1 , EG (exception ) ? ce_exception -> name : Z_STRVAL_P (str ) TSRMLS_CC );
763+ zend_update_property_string (default_exception_ce , exception , "string" , sizeof ("string" )- 1 , EG (exception ) ? ce_exception -> name : Z_STRVAL_P (str ) TSRMLS_CC );
764764 }
765765 }
766766 zval_ptr_dtor (& str );
767767
768768 if (EG (exception )) {
769769 /* do the best we can to inform about the inner exception */
770- if (instanceof_function (ce_exception , U_CLASS_ENTRY ( default_exception_ce ) TSRMLS_CC )) {
771- file = zend_read_property (U_CLASS_ENTRY ( default_exception_ce ) , EG (exception ), "file" , sizeof ("file" )- 1 , 1 TSRMLS_CC );
772- line = zend_read_property (U_CLASS_ENTRY ( default_exception_ce ) , EG (exception ), "line" , sizeof ("line" )- 1 , 1 TSRMLS_CC );
770+ if (instanceof_function (ce_exception , default_exception_ce TSRMLS_CC )) {
771+ file = zend_read_property (default_exception_ce , EG (exception ), "file" , sizeof ("file" )- 1 , 1 TSRMLS_CC );
772+ line = zend_read_property (default_exception_ce , EG (exception ), "line" , sizeof ("line" )- 1 , 1 TSRMLS_CC );
773773 } else {
774774 file = NULL ;
775775 line = NULL ;
776776 }
777777 zend_error_va (E_WARNING , file ? Z_STRVAL_P (file ) : NULL , line ? Z_LVAL_P (line ) : 0 , "Uncaught %v in exception handling during call to %v::__tostring()" , Z_OBJCE_P (EG (exception ))-> name , ce_exception -> name );
778778 }
779779
780- str = zend_read_property (U_CLASS_ENTRY ( default_exception_ce ) , exception , "string" , sizeof ("string" )- 1 , 1 TSRMLS_CC );
781- file = zend_read_property (U_CLASS_ENTRY ( default_exception_ce ) , exception , "file" , sizeof ("file" )- 1 , 1 TSRMLS_CC );
782- line = zend_read_property (U_CLASS_ENTRY ( default_exception_ce ) , exception , "line" , sizeof ("line" )- 1 , 1 TSRMLS_CC );
780+ str = zend_read_property (default_exception_ce , exception , "string" , sizeof ("string" )- 1 , 1 TSRMLS_CC );
781+ file = zend_read_property (default_exception_ce , exception , "file" , sizeof ("file" )- 1 , 1 TSRMLS_CC );
782+ line = zend_read_property (default_exception_ce , exception , "line" , sizeof ("line" )- 1 , 1 TSRMLS_CC );
783783
784784 if (Z_TYPE_P (file ) == IS_UNICODE ) {
785785 zval copy ;
@@ -806,7 +806,7 @@ ZEND_API void zend_throw_exception_object(zval *exception TSRMLS_DC)
806806
807807 exception_ce = Z_OBJCE_P (exception );
808808
809- if (!exception_ce || !instanceof_function (exception_ce , U_CLASS_ENTRY ( default_exception_ce ) TSRMLS_CC )) {
809+ if (!exception_ce || !instanceof_function (exception_ce , default_exception_ce TSRMLS_CC )) {
810810 zend_error (E_ERROR , "Exceptions must be valid objects derived from the Exception base class" );
811811 }
812812 zend_throw_exception_internal (exception TSRMLS_CC );
0 commit comments