From 2d42099a234a721e5c81783ef184058ae3d3397b Mon Sep 17 00:00:00 2001 From: Chrono Date: Thu, 12 Oct 2023 16:53:56 +0800 Subject: [PATCH] style(stream): remove unneeded function declarations in stream (#71) Shdict workaround is no longer needed as they have been upstreamed to OpenResty alrerady: https://github.com/openresty/lua-nginx-module/commit/653d6a36f46b077cb902d7ba40824c299cf9bbf4 --- stream/src/ngx_stream_lua_kong_module.h | 71 +------------------------ 1 file changed, 1 insertion(+), 70 deletions(-) diff --git a/stream/src/ngx_stream_lua_kong_module.h b/stream/src/ngx_stream_lua_kong_module.h index c1630222..309844bf 100644 --- a/stream/src/ngx_stream_lua_kong_module.h +++ b/stream/src/ngx_stream_lua_kong_module.h @@ -24,77 +24,8 @@ typedef struct { ngx_flag_t ngx_stream_lua_kong_get_proxy_ssl_disable(ngx_stream_session_t *s); - -// macOS with M1 fixes, see: https://github.com/LuaJIT/LuaJIT/issues/205 - -int ngx_stream_lua_ffi_shdict_get(ngx_shm_zone_t *zone, const unsigned char *key, - size_t key_len, int *value_type, unsigned char **str_value_buf, - size_t *str_value_len, double *num_value, int *user_flags, - int get_stale, int *is_stale, char **errmsg); - -typedef struct { - ngx_shm_zone_t *zone; - const unsigned char *key; - size_t key_len; - int *value_type; - unsigned char **str_value_buf; - size_t *str_value_len; - double *num_value; - int *user_flags; - int get_stale; - int *is_stale; - char **errmsg; -} ngx_shdict_get_t; - -int ngx_stream_lua_ffi_shdict_get_m1(ngx_shdict_get_t *s); - - -int ngx_stream_lua_ffi_shdict_store(ngx_shm_zone_t *zone, int op, - const unsigned char *key, size_t key_len, int value_type, - const unsigned char *str_value_buf, size_t str_value_len, - double num_value, long exptime, int user_flags, char **errmsg, - int *forcible); - -typedef struct { - ngx_shm_zone_t *zone; - int op; - const unsigned char *key; - size_t key_len; - int value_type; - const unsigned char *str_value_buf; - size_t str_value_len; - double num_value; - long exptime; - int user_flags; - char **errmsg; - int *forcible; -} ngx_shdict_store_t; - -int ngx_stream_lua_ffi_shdict_store_m1(ngx_shdict_store_t *s); - - -int ngx_stream_lua_ffi_shdict_incr(ngx_shm_zone_t *zone, const unsigned char *key, - size_t key_len, double *num_value, char **errmsg, int has_init, - double init, long init_ttl, int *forcible); - -typedef struct { - ngx_shm_zone_t *zone; - const unsigned char *key; - size_t key_len; - double *num_value; - char **errmsg; - int has_init; - double init; - long init_ttl; - int *forcible; -} ngx_shdict_incr_t; - -int ngx_stream_lua_ffi_shdict_incr_m1(ngx_shdict_incr_t *s); - -// macOS with M1 fixes end - void -ngx_stream_lua_kong_set_upstream_ssl(ngx_stream_session_t *s, +ngx_stream_lua_kong_set_upstream_ssl(ngx_stream_session_t *s, ngx_connection_t *c); ngx_flag_t