@@ -14,9 +14,9 @@ use std::slice;
14
14
use ngx:: core:: prelude:: * ;
15
15
use ngx:: core:: { Pool , Status } ;
16
16
use ngx:: ffi:: {
17
- nginx_version , ngx_atoi, ngx_event_free_peer_pt, ngx_event_get_peer_pt, ngx_http_upstream_init_peer_pt,
18
- ngx_http_upstream_init_pt , ngx_http_upstream_init_round_robin, ngx_http_upstream_module,
19
- ngx_http_upstream_srv_conf_t , ngx_http_upstream_t , ngx_peer_connection_t, NGX_ERROR , NGX_RS_MODULE_SIGNATURE ,
17
+ ngx_atoi, ngx_event_free_peer_pt, ngx_event_get_peer_pt, ngx_http_upstream_init_peer_pt, ngx_http_upstream_init_pt ,
18
+ ngx_http_upstream_init_round_robin, ngx_http_upstream_module, ngx_http_upstream_srv_conf_t , ngx_http_upstream_t ,
19
+ ngx_peer_connection_t, NGX_ERROR ,
20
20
} ;
21
21
use ngx:: http:: prelude:: * ;
22
22
use ngx:: http:: {
@@ -109,34 +109,10 @@ ngx::ngx_modules!(ngx_http_upstream_custom_module);
109
109
#[ allow( non_upper_case_globals) ]
110
110
#[ cfg_attr( not( feature = "export-modules" ) , no_mangle) ]
111
111
pub static mut ngx_http_upstream_custom_module: ngx_module_t = ngx_module_t {
112
- ctx_index : ngx_uint_t:: MAX ,
113
- index : ngx_uint_t:: MAX ,
114
- name : std:: ptr:: null_mut ( ) ,
115
- spare0 : 0 ,
116
- spare1 : 0 ,
117
- version : nginx_version as ngx_uint_t ,
118
- signature : NGX_RS_MODULE_SIGNATURE . as_ptr ( ) as * const c_char ,
119
-
120
- ctx : & NGX_HTTP_UPSTREAM_CUSTOM_CTX as * const _ as * mut _ ,
112
+ ctx : std:: ptr:: addr_of!( NGX_HTTP_UPSTREAM_CUSTOM_CTX ) as _ ,
121
113
commands : unsafe { & NGX_HTTP_UPSTREAM_CUSTOM_COMMANDS [ 0 ] as * const _ as * mut _ } ,
122
- type_ : NGX_HTTP_MODULE as ngx_uint_t ,
123
-
124
- init_master : None ,
125
- init_module : None ,
126
- init_process : None ,
127
- init_thread : None ,
128
- exit_thread : None ,
129
- exit_process : None ,
130
- exit_master : None ,
131
-
132
- spare_hook0 : 0 ,
133
- spare_hook1 : 0 ,
134
- spare_hook2 : 0 ,
135
- spare_hook3 : 0 ,
136
- spare_hook4 : 0 ,
137
- spare_hook5 : 0 ,
138
- spare_hook6 : 0 ,
139
- spare_hook7 : 0 ,
114
+ type_ : NGX_HTTP_MODULE as _ ,
115
+ ..ngx_module_t:: default ( )
140
116
} ;
141
117
142
118
// http_upstream_init_custom_peer
0 commit comments