File tree Expand file tree Collapse file tree 4 files changed +22
-21
lines changed Expand file tree Collapse file tree 4 files changed +22
-21
lines changed Original file line number Diff line number Diff line change 3535#include "ngx_stream_lua_request.h"
3636
3737
38- #if defined(NGX_PCRE ) && !defined(NGX_PCRE2 )
38+ #if (NGX_PCRE )
39+ # if (NGX_PCRE2 )
40+ # define LUA_HAVE_PCRE_JIT 1
41+ # else
3942
4043#include <pcre.h>
4144
42- #if (PCRE_MAJOR > 8 ) || (PCRE_MAJOR == 8 && PCRE_MINOR >= 21 )
43- # define LUA_HAVE_PCRE_JIT 1
44- #else
45- # define LUA_HAVE_PCRE_JIT 0
46- #endif
47-
48- #endif
49-
50- #if (NGX_PCRE2 )
51- # define LUA_HAVE_PCRE_JIT 1
45+ # if (PCRE_MAJOR > 8 ) || (PCRE_MAJOR == 8 && PCRE_MINOR >= 21 )
46+ # define LUA_HAVE_PCRE_JIT 1
47+ # else
48+ # define LUA_HAVE_PCRE_JIT 0
49+ # endif
50+ # endif
5251#endif
5352
5453
@@ -193,16 +192,18 @@ struct ngx_stream_lua_main_conf_s {
193192
194193 ngx_connection_t * watcher ; /* for watching the process exit event */
195194
196- #if (NGX_PCRE || NGX_PCRE2 )
195+ #if (NGX_PCRE )
197196 ngx_int_t regex_cache_entries ;
198197 ngx_int_t regex_cache_max_entries ;
199198 ngx_int_t regex_match_limit ;
199+ #endif
200200
201+ #if (LUA_HAVE_PCRE_JIT )
201202#if (NGX_PCRE2 )
202203 pcre2_jit_stack * jit_stack ;
203- #elif ( LUA_HAVE_PCRE_JIT )
204+ #else
204205 pcre_jit_stack * jit_stack ;
205- # endif
206+ #endif
206207#endif
207208
208209 ngx_array_t * shm_zones ; /* of ngx_shm_zone_t* */
Original file line number Diff line number Diff line change 2222#include "ngx_stream_lua_pcrefix.h"
2323#include "stdio.h"
2424
25- #if (NGX_PCRE || NGX_PCRE2 )
25+ #if (NGX_PCRE )
2626
2727static ngx_pool_t * ngx_stream_lua_pcre_pool = NULL ;
2828
@@ -190,6 +190,6 @@ ngx_stream_lua_pcre_malloc_done(ngx_pool_t *old_pool)
190190}
191191
192192#endif
193- #endif /* NGX_PCRE || NGX_PCRE2 */
193+ #endif /* NGX_PCRE */
194194
195195/* vi:set ft=c ts=4 sw=4 et fdm=marker: */
Original file line number Diff line number Diff line change 2020#include "ngx_stream_lua_common.h"
2121
2222
23- #if (NGX_PCRE || NGX_PCRE2 )
23+ #if (NGX_PCRE )
2424ngx_pool_t * ngx_stream_lua_pcre_malloc_init (ngx_pool_t * pool );
2525void ngx_stream_lua_pcre_malloc_done (ngx_pool_t * old_pool );
2626
27- #if NGX_PCRE2
27+ #if ( NGX_PCRE2 )
2828void * ngx_stream_lua_pcre_malloc (size_t size , void * data );
2929void ngx_stream_lua_pcre_free (void * ptr , void * data );
3030#endif
Original file line number Diff line number Diff line change 1818#include "ddebug.h"
1919
2020
21- #if (NGX_PCRE || NGX_PCRE2 )
21+ #if (NGX_PCRE )
2222
2323#include "ngx_stream_lua_pcrefix.h"
2424#include "ngx_stream_lua_script.h"
@@ -338,7 +338,7 @@ ngx_int_t
338338ngx_stream_lua_ffi_set_jit_stack_size (int size , u_char * errstr ,
339339 size_t * errstr_size )
340340{
341- #if (NGX_PCRE2 || LUA_HAVE_PCRE_JIT )
341+ #if (LUA_HAVE_PCRE_JIT )
342342
343343 ngx_stream_lua_main_conf_t * lmcf ;
344344 ngx_pool_t * pool , * old_pool ;
@@ -982,7 +982,7 @@ ngx_stream_lua_ffi_pcre_version(void)
982982}
983983
984984
985- #endif /* NGX_PCRE || NGX_PCRE2 */
985+ #endif /* NGX_PCRE */
986986
987987
988988/* vi:set ft=c ts=4 sw=4 et fdm=marker: */
You can’t perform that action at this time.
0 commit comments