@@ -62,8 +62,6 @@ ZEND_TSRMLS_CACHE_DEFINE()
6262ZEND_API zend_utility_values zend_uv ;
6363ZEND_API zend_bool zend_dtrace_enabled ;
6464
65- zend_llist zend_error_notify_callbacks ;
66-
6765/* version information */
6866static char * zend_version_info ;
6967static uint32_t zend_version_info_length ;
@@ -832,7 +830,6 @@ void zend_startup(zend_utility_functions *utility_functions) /* {{{ */
832830
833831 zend_startup_strtod ();
834832 zend_startup_extensions_mechanism ();
835- zend_startup_error_notify_callbacks ();
836833
837834 /* Set up utility functions and values */
838835 zend_error_cb = utility_functions -> error_function ;
@@ -865,7 +862,7 @@ void zend_startup(zend_utility_functions *utility_functions) /* {{{ */
865862 zend_execute_ex = dtrace_execute_ex ;
866863 zend_execute_internal = dtrace_execute_internal ;
867864
868- zend_register_error_notify_callback (dtrace_error_notify_cb );
865+ zend_observer_error_register (dtrace_error_notify_cb );
869866 } else {
870867 zend_compile_file = compile_file ;
871868 zend_execute_ex = execute_ex ;
@@ -1093,7 +1090,6 @@ void zend_shutdown(void) /* {{{ */
10931090 zend_hash_destroy (GLOBAL_AUTO_GLOBALS_TABLE );
10941091 free (GLOBAL_AUTO_GLOBALS_TABLE );
10951092
1096- zend_shutdown_error_notify_callbacks ();
10971093 zend_shutdown_extensions ();
10981094 free (zend_version_info );
10991095
@@ -1329,7 +1325,7 @@ static ZEND_COLD void zend_error_impl(
13291325 }
13301326 }
13311327
1332- zend_error_notify_all_callbacks (type , error_filename , error_lineno , message );
1328+ zend_observer_error_notify (type , error_filename , error_lineno , message );
13331329
13341330 /* if we don't have a user defined error handler */
13351331 if (Z_TYPE (EG (user_error_handler )) == IS_UNDEF
@@ -1792,29 +1788,3 @@ ZEND_API void zend_map_ptr_extend(size_t last)
17921788 CG (map_ptr_last ) = last ;
17931789 }
17941790}
1795-
1796- void zend_startup_error_notify_callbacks (void )
1797- {
1798- zend_llist_init (& zend_error_notify_callbacks , sizeof (zend_error_notify_cb ), NULL , 1 );
1799- }
1800-
1801- void zend_shutdown_error_notify_callbacks (void )
1802- {
1803- zend_llist_destroy (& zend_error_notify_callbacks );
1804- }
1805-
1806- ZEND_API void zend_register_error_notify_callback (zend_error_notify_cb cb )
1807- {
1808- zend_llist_add_element (& zend_error_notify_callbacks , & cb );
1809- }
1810-
1811- void zend_error_notify_all_callbacks (int type , const char * error_filename , uint32_t error_lineno , zend_string * message )
1812- {
1813- zend_llist_element * element ;
1814- zend_error_notify_cb callback ;
1815-
1816- for (element = zend_error_notify_callbacks .head ; element ; element = element -> next ) {
1817- callback = * (zend_error_notify_cb * ) (element -> data );
1818- callback (type , error_filename , error_lineno , message );
1819- }
1820- }
0 commit comments