Skip to content

Commit e3eb228

Browse files
authored
shdict: enabled FFI support. #f222cc0
1 parent 87863ca commit e3eb228

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/ngx_stream_lua_shdict.c

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11

2+
/*
3+
* !!! DO NOT EDIT DIRECTLY !!!
4+
* This file was automatically generated from the following template:
5+
*
6+
* src/subsys/ngx_subsys_lua_shdict.c.tt2
7+
*/
8+
9+
210
/*
311
* Copyright (C) Yichun Zhang (agentzh)
412
*/
@@ -2230,11 +2238,10 @@ ngx_stream_lua_find_zone(u_char *name_data, size_t name_len)
22302238
}
22312239

22322240

2233-
#ifndef NGX_LUA_NO_FFI_API
22342241
int
22352242
ngx_stream_lua_ffi_shdict_store(ngx_shm_zone_t *zone, int op, u_char *key,
22362243
size_t key_len, int value_type, u_char *str_value_buf,
2237-
size_t str_value_len, double num_value, int exptime, int user_flags,
2244+
size_t str_value_len, double num_value, long exptime, int user_flags,
22382245
char **errmsg, int *forcible)
22392246
{
22402247
int i, n;
@@ -2252,7 +2259,7 @@ ngx_stream_lua_ffi_shdict_store(ngx_shm_zone_t *zone, int op, u_char *key,
22522259
return NGX_ERROR;
22532260
}
22542261

2255-
dd("exptime: %d", exptime);
2262+
dd("exptime: %ld", exptime);
22562263

22572264
ctx = zone->data;
22582265

@@ -2930,7 +2937,7 @@ ngx_stream_lua_shdict_peek(ngx_shm_zone_t *shm_zone, ngx_uint_t hash,
29302937
}
29312938

29322939

2933-
int
2940+
long
29342941
ngx_stream_lua_ffi_shdict_get_ttl(ngx_shm_zone_t *zone, u_char *key,
29352942
size_t key_len)
29362943
{
@@ -2979,7 +2986,7 @@ ngx_stream_lua_ffi_shdict_get_ttl(ngx_shm_zone_t *zone, u_char *key,
29792986

29802987
int
29812988
ngx_stream_lua_ffi_shdict_set_expire(ngx_shm_zone_t *zone, u_char *key,
2982-
size_t key_len, int exptime)
2989+
size_t key_len, long exptime)
29832990
{
29842991
uint32_t hash;
29852992
ngx_int_t rc;
@@ -3051,7 +3058,4 @@ ngx_stream_lua_ffi_shdict_free_space(ngx_shm_zone_t *zone)
30513058
# endif /* nginx_version >= 1011007 */
30523059

30533060

3054-
#endif /* NGX_LUA_NO_FFI_API */
3055-
3056-
30573061
/* vi:set ft=c ts=4 sw=4 et fdm=marker: */

0 commit comments

Comments
 (0)