changeset 8638:d1cf691a82e8 quic

Core: hide "struct ngx_quic_connection_s" and further reduce diffs. As with the previous change, it became feasible with feec2cc762f6 that removes ngx_quic_connection_t from ngx_connection_s.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 13 Nov 2020 15:11:29 +0000
parents c436681ad8e0
children 9d28e9028aa5
files src/core/ngx_core.h src/event/ngx_event_quic.c
diffstat 2 files changed, 20 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_core.h
+++ b/src/core/ngx_core.h
@@ -12,25 +12,24 @@
 #include <ngx_config.h>
 
 
-typedef struct ngx_module_s           ngx_module_t;
-typedef struct ngx_conf_s             ngx_conf_t;
-typedef struct ngx_cycle_s            ngx_cycle_t;
-typedef struct ngx_pool_s             ngx_pool_t;
-typedef struct ngx_chain_s            ngx_chain_t;
-typedef struct ngx_log_s              ngx_log_t;
-typedef struct ngx_open_file_s        ngx_open_file_t;
-typedef struct ngx_command_s          ngx_command_t;
-typedef struct ngx_file_s             ngx_file_t;
-typedef struct ngx_event_s            ngx_event_t;
-typedef struct ngx_event_aio_s        ngx_event_aio_t;
-typedef struct ngx_connection_s       ngx_connection_t;
-typedef struct ngx_thread_task_s      ngx_thread_task_t;
-typedef struct ngx_ssl_s              ngx_ssl_t;
-typedef struct ngx_proxy_protocol_s   ngx_proxy_protocol_t;
-typedef struct ngx_quic_connection_s  ngx_quic_connection_t;
-typedef struct ngx_quic_stream_s      ngx_quic_stream_t;
-typedef struct ngx_ssl_connection_s   ngx_ssl_connection_t;
-typedef struct ngx_udp_connection_s   ngx_udp_connection_t;
+typedef struct ngx_module_s          ngx_module_t;
+typedef struct ngx_conf_s            ngx_conf_t;
+typedef struct ngx_cycle_s           ngx_cycle_t;
+typedef struct ngx_pool_s            ngx_pool_t;
+typedef struct ngx_chain_s           ngx_chain_t;
+typedef struct ngx_log_s             ngx_log_t;
+typedef struct ngx_open_file_s       ngx_open_file_t;
+typedef struct ngx_command_s         ngx_command_t;
+typedef struct ngx_file_s            ngx_file_t;
+typedef struct ngx_event_s           ngx_event_t;
+typedef struct ngx_event_aio_s       ngx_event_aio_t;
+typedef struct ngx_connection_s      ngx_connection_t;
+typedef struct ngx_thread_task_s     ngx_thread_task_t;
+typedef struct ngx_ssl_s             ngx_ssl_t;
+typedef struct ngx_proxy_protocol_s  ngx_proxy_protocol_t;
+typedef struct ngx_quic_stream_s     ngx_quic_stream_t;
+typedef struct ngx_ssl_connection_s  ngx_ssl_connection_t;
+typedef struct ngx_udp_connection_s  ngx_udp_connection_t;
 
 typedef void (*ngx_event_handler_pt)(ngx_event_t *ev);
 typedef void (*ngx_connection_handler_pt)(ngx_connection_t *c);
--- a/src/event/ngx_event_quic.c
+++ b/src/event/ngx_event_quic.c
@@ -114,7 +114,7 @@ typedef struct {
 } ngx_quic_send_ctx_t;
 
 
-struct ngx_quic_connection_s {
+typedef struct {
     ngx_udp_connection_t              udp;
 
     uint32_t                          version;
@@ -182,7 +182,7 @@ struct ngx_quic_connection_s {
     unsigned                          in_retry:1;
     unsigned                          initialized:1;
     unsigned                          validated:1;
-};
+} ngx_quic_connection_t;
 
 
 typedef struct {