Skip to content

Commit

Permalink
style(stream): remove unneeded function declarations in stream (#71)
Browse files Browse the repository at this point in the history
Shdict workaround is no longer needed as they have been upstreamed to OpenResty alrerady:
openresty/lua-nginx-module@653d6a3
  • Loading branch information
chronolaw authored Oct 12, 2023
1 parent 8296b70 commit 2d42099
Showing 1 changed file with 1 addition and 70 deletions.
71 changes: 1 addition & 70 deletions stream/src/ngx_stream_lua_kong_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2d42099

Please sign in to comment.