Skip to content

Commit c2f88f8

Browse files
committed
bugfix: compilation error when PCRE is disabled in the nginx build. thanks Ivan Cekov for the report in openresty#428.
1 parent 9ea909b commit c2f88f8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/ngx_http_lua_util.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3939,15 +3939,23 @@ int
39393939
ngx_http_lua_do_call(ngx_log_t *log, lua_State *L)
39403940
{
39413941
int status, base;
3942+
#if (NGX_PCRE)
39423943
ngx_pool_t *old_pool;
3944+
#endif
39433945

39443946
base = lua_gettop(L); /* function index */
39453947
lua_pushcfunction(L, ngx_http_lua_traceback); /* push traceback function */
39463948
lua_insert(L, base); /* put it under chunk and args */
39473949

3950+
#if (NGX_PCRE)
39483951
old_pool = ngx_http_lua_pcre_malloc_init(ngx_cycle->pool);
3952+
#endif
3953+
39493954
status = lua_pcall(L, 0, 0, base);
3955+
3956+
#if (NGX_PCRE)
39503957
ngx_http_lua_pcre_malloc_done(old_pool);
3958+
#endif
39513959

39523960
lua_remove(L, base);
39533961

0 commit comments

Comments
 (0)