@@ -13,12 +13,11 @@ use std::slice;
1313
1414use ngx:: core:: { Pool , Status } ;
1515use ngx:: ffi:: {
16- nginx_version, ngx_atoi, ngx_command_t, ngx_conf_t, ngx_connection_t, ngx_event_free_peer_pt,
17- ngx_event_get_peer_pt, ngx_http_module_t, 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_int_t, ngx_module_t, ngx_peer_connection_t, ngx_str_t, ngx_uint_t, NGX_CONF_NOARGS , NGX_CONF_TAKE1 ,
20- NGX_CONF_UNSET , NGX_ERROR , NGX_HTTP_MODULE , NGX_HTTP_UPS_CONF , NGX_LOG_EMERG , NGX_RS_HTTP_SRV_CONF_OFFSET ,
21- NGX_RS_MODULE_SIGNATURE ,
16+ ngx_atoi, ngx_command_t, ngx_conf_t, ngx_connection_t, ngx_event_free_peer_pt, ngx_event_get_peer_pt,
17+ ngx_http_module_t, ngx_http_upstream_init_peer_pt, ngx_http_upstream_init_pt, ngx_http_upstream_init_round_robin,
18+ ngx_http_upstream_module, ngx_http_upstream_srv_conf_t, ngx_http_upstream_t, ngx_int_t, ngx_module_t,
19+ ngx_peer_connection_t, ngx_str_t, ngx_uint_t, NGX_CONF_NOARGS , NGX_CONF_TAKE1 , NGX_CONF_UNSET , NGX_ERROR ,
20+ NGX_HTTP_MODULE , NGX_HTTP_UPS_CONF , NGX_LOG_EMERG , NGX_RS_HTTP_SRV_CONF_OFFSET ,
2221} ;
2322use ngx:: http:: {
2423 ngx_http_conf_get_module_srv_conf, ngx_http_conf_upstream_srv_conf_immutable,
@@ -110,34 +109,10 @@ ngx::ngx_modules!(ngx_http_upstream_custom_module);
110109#[ allow( non_upper_case_globals) ]
111110#[ cfg_attr( not( feature = "export-modules" ) , no_mangle) ]
112111pub static mut ngx_http_upstream_custom_module: ngx_module_t = ngx_module_t {
113- ctx_index : ngx_uint_t:: MAX ,
114- index : ngx_uint_t:: MAX ,
115- name : std:: ptr:: null_mut ( ) ,
116- spare0 : 0 ,
117- spare1 : 0 ,
118- version : nginx_version as ngx_uint_t ,
119- signature : NGX_RS_MODULE_SIGNATURE . as_ptr ( ) as * const c_char ,
120-
121- ctx : & NGX_HTTP_UPSTREAM_CUSTOM_CTX as * const _ as * mut _ ,
112+ ctx : std:: ptr:: addr_of!( NGX_HTTP_UPSTREAM_CUSTOM_CTX ) as _ ,
122113 commands : unsafe { & NGX_HTTP_UPSTREAM_CUSTOM_COMMANDS [ 0 ] as * const _ as * mut _ } ,
123- type_ : NGX_HTTP_MODULE as ngx_uint_t ,
124-
125- init_master : None ,
126- init_module : None ,
127- init_process : None ,
128- init_thread : None ,
129- exit_thread : None ,
130- exit_process : None ,
131- exit_master : None ,
132-
133- spare_hook0 : 0 ,
134- spare_hook1 : 0 ,
135- spare_hook2 : 0 ,
136- spare_hook3 : 0 ,
137- spare_hook4 : 0 ,
138- spare_hook5 : 0 ,
139- spare_hook6 : 0 ,
140- spare_hook7 : 0 ,
114+ type_ : NGX_HTTP_MODULE as _ ,
115+ ..ngx_module_t:: default ( )
141116} ;
142117
143118// http_upstream_init_custom_peer
0 commit comments