diff --git a/src/subsys/api/ngx_subsys_lua_api.h.tt2 b/src/subsys/api/ngx_subsys_lua_api.h.tt2 index d31c5e7..0fb7ff3 100644 --- a/src/subsys/api/ngx_subsys_lua_api.h.tt2 +++ b/src/subsys/api/ngx_subsys_lua_api.h.tt2 @@ -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); diff --git a/src/subsys/ngx_subsys_lua_util.h.tt2 b/src/subsys/ngx_subsys_lua_util.h.tt2 index 56493c5..039ee48 100644 --- a/src/subsys/ngx_subsys_lua_util.h.tt2 +++ b/src/subsys/ngx_subsys_lua_util.h.tt2 @@ -10,6 +10,7 @@ #include "ngx_[% subsys %]_lua_common.h" +#include "api/ngx_[% subsys %]_lua_api.h" #ifndef NGX_UNESCAPE_URI_COMPONENT @@ -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;