Skip to content

Commit 809192c

Browse files
spacewanderagentzh
authored andcommitted
feature: api.h: exposed the ngx_http_lua_ffi_str_t type for other Nginx C modules.
Signed-off-by: Yichun Zhang (agentzh) <[email protected]>
1 parent 23e69fb commit 809192c

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/api/ngx_http_lua_api.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ typedef struct {
3434
} ngx_http_lua_value_t;
3535

3636

37+
typedef struct {
38+
int len;
39+
/* this padding hole on 64-bit systems is expected */
40+
u_char *data;
41+
} ngx_http_lua_ffi_str_t;
42+
43+
3744
lua_State *ngx_http_lua_get_global_state(ngx_conf_t *cf);
3845

3946
ngx_http_request_t *ngx_http_lua_get_request(lua_State *L);

src/ngx_http_lua_util.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111

1212
#include "ngx_http_lua_common.h"
13+
#include "ngx_http_lua_api.h"
1314

1415

1516
#ifndef NGX_UNESCAPE_URI_COMPONENT
@@ -18,13 +19,6 @@
1819

1920

2021
#ifndef NGX_LUA_NO_FFI_API
21-
typedef struct {
22-
int len;
23-
/* this padding hole on 64-bit systems is expected */
24-
u_char *data;
25-
} ngx_http_lua_ffi_str_t;
26-
27-
2822
typedef struct {
2923
ngx_http_lua_ffi_str_t key;
3024
ngx_http_lua_ffi_str_t value;

0 commit comments

Comments
 (0)