Skip to content

feature: exposed ngx_http_lua_ffi_str_t for other Nginx modules. #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/subsys/api/ngx_subsys_lua_api.h.tt2
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ typedef struct {
} ngx_[% subsys %]_lua_value_t;


#ifndef NGX_LUA_NO_FFI_API
typedef struct {
int len;
/* this padding hole on 64-bit systems is expected */
u_char *data;
} ngx_[% subsys %]_lua_ffi_str_t;
#endif /* NGX_LUA_NO_FFI_API */


lua_State *ngx_[% subsys %]_lua_get_global_state(ngx_conf_t *cf);

[% req_type %] *ngx_[% subsys %]_lua_get_request(lua_State *L);
Expand Down
8 changes: 1 addition & 7 deletions src/subsys/ngx_subsys_lua_util.h.tt2
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@


#include "ngx_[% subsys %]_lua_common.h"
#include "api/ngx_[% subsys %]_lua_api.h"


#ifndef NGX_UNESCAPE_URI_COMPONENT
Expand All @@ -18,13 +19,6 @@


#ifndef NGX_LUA_NO_FFI_API
typedef struct {
int len;
/* this padding hole on 64-bit systems is expected */
u_char *data;
} ngx_[% subsys %]_lua_ffi_str_t;


typedef struct {
ngx_[% subsys %]_lua_ffi_str_t key;
ngx_[% subsys %]_lua_ffi_str_t value;
Expand Down