From df93e05c2ef21a1bfab91d4e38c10df61d9ecc13 Mon Sep 17 00:00:00 2001 From: "Philip.Hazel" Date: Fri, 3 Oct 2014 09:25:57 +0000 Subject: [PATCH] Remove match context argument from pcre2_jit_compile. --- src/pcre2.h.in | 3 +-- src/pcre2_jit_compile.c | 2 +- src/pcre2test.c | 22 +++++++++++----------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/pcre2.h.in b/src/pcre2.h.in index 266d889..7cd0271 100644 --- a/src/pcre2.h.in +++ b/src/pcre2.h.in @@ -451,8 +451,7 @@ PCRE2_EXP_DECL int pcre2_substring_list_get(pcre2_match_data *, \ /* Functions for JIT processing */ #define PCRE2_JIT_FUNCTIONS \ -PCRE2_EXP_DECL int pcre2_jit_compile(pcre2_code *, uint32_t, \ - pcre2_match_context *); \ +PCRE2_EXP_DECL int pcre2_jit_compile(pcre2_code *, uint32_t); \ PCRE2_EXP_DECL int pcre2_jit_match(const pcre2_code *, \ PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, uint32_t, \ pcre2_match_data *, pcre2_match_context *, \ diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c index 5eec313..37f1b5e 100644 --- a/src/pcre2_jit_compile.c +++ b/src/pcre2_jit_compile.c @@ -125,7 +125,7 @@ Returns: nothing /* FIXME: this is currently a placeholder function */ PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION -pcre2_jit_compile(pcre2_code *code, uint32_t options, pcre2_match_context *mcontext) +pcre2_jit_compile(pcre2_code *code, uint32_t options) { #ifndef SUPPORT_JIT diff --git a/src/pcre2test.c b/src/pcre2test.c index 7c1f2ae..5cdb695 100644 --- a/src/pcre2test.c +++ b/src/pcre2test.c @@ -769,10 +769,10 @@ are supported. */ else \ r = pcre2_get_error_message_32(a,G(b,32),G(G(b,32),_size)) -#define PCRE2_JIT_COMPILE(a,b,c) \ - if (test_mode == PCRE8_MODE) pcre2_jit_compile_8(G(a,8),b,G(c,8)); \ - else if (test_mode == PCRE16_MODE) pcre2_jit_compile_16(G(a,16),b,G(c,16)); \ - else pcre2_jit_compile_32(G(a,32),b,G(c,32)) +#define PCRE2_JIT_COMPILE(a,b) \ + if (test_mode == PCRE8_MODE) pcre2_jit_compile_8(G(a,8),b); \ + else if (test_mode == PCRE16_MODE) pcre2_jit_compile_16(G(a,16),b); \ + else pcre2_jit_compile_32(G(a,32),b) #define PCRE2_JIT_STACK_ALLOC(a,b,c,d) \ if (test_mode == PCRE8_MODE) \ @@ -1080,11 +1080,11 @@ the three different cases. */ else \ r = G(pcre2_get_error_message_,BITTWO)(a,G(b,BITTWO),G(G(b,BITTWO),_size)) -#define PCRE2_JIT_COMPILE(a,b,c) \ +#define PCRE2_JIT_COMPILE(a,b) \ if (test_mode == G(G(PCRE,BITONE),_MODE)) \ - G(pcre2_jit_compile_,BITONE)(G(a,BITONE),b,G(c,BITONE)); \ + G(pcre2_jit_compile_,BITONE)(G(a,BITONE),b); \ else \ - G(pcre2_jit_compile_,BITTWO)(G(a,BITTWO),b,G(c,BITTWO)) + G(pcre2_jit_compile_,BITTWO)(G(a,BITTWO),b) #define PCRE2_JIT_STACK_ALLOC(a,b,c,d) \ if (test_mode == G(G(PCRE,BITONE),_MODE)) \ @@ -1296,7 +1296,7 @@ the three different cases. */ a = pcre2_dfa_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),G(h,8),i,j) #define PCRE2_GET_ERROR_MESSAGE(r,a,b) \ r = pcre2_get_error_message_8(a,G(b,8),G(G(b,8),_size)) -#define PCRE2_JIT_COMPILE(a,b,c) pcre2_jit_compile_8(G(a,8),b,G(c,8)) +#define PCRE2_JIT_COMPILE(a,b) pcre2_jit_compile_8(G(a,8),b) #define PCRE2_JIT_STACK_ALLOC(a,b,c,d) \ a = (PCRE2_JIT_STACK *)pcre2_jit_stack_alloc_8(b,c,d); #define PCRE2_JIT_STACK_ASSIGN(a,b,c) \ @@ -1360,7 +1360,7 @@ the three different cases. */ a = pcre2_dfa_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),G(h,16),i,j) #define PCRE2_GET_ERROR_MESSAGE(r,a,b) \ r = pcre2_get_error_message_16(a,G(b,16),G(G(b,16),_size)) -#define PCRE2_JIT_COMPILE(a,b,c) pcre2_jit_compile_16(G(a,16),b,G(c,16)) +#define PCRE2_JIT_COMPILE(a,b) pcre2_jit_compile_16(G(a,16),b) #define PCRE2_JIT_STACK_ALLOC(a,b,c,d) \ a = (PCRE2_JIT_STACK *)pcre2_jit_stack_alloc_16(b,c,d); #define PCRE2_JIT_STACK_ASSIGN(a,b,c) \ @@ -1424,7 +1424,7 @@ the three different cases. */ a = pcre2_dfa_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),G(h,32),i,j) #define PCRE2_GET_ERROR_MESSAGE(r,a,b) \ r = pcre2_get_error_message_32(a,G(b,32),G(G(b,32),_size)) -#define PCRE2_JIT_COMPILE(a,b,c) pcre2_jit_compile_32(G(a,32),b,G(c,32)) +#define PCRE2_JIT_COMPILE(a,b) pcre2_jit_compile_32(G(a,32),b) #define PCRE2_JIT_STACK_ALLOC(a,b,c,d) \ a = (PCRE2_JIT_STACK *)pcre2_jit_stack_alloc_32(b,c,d); #define PCRE2_JIT_STACK_ASSIGN(a,b,c) \ @@ -3706,7 +3706,7 @@ if (TEST(compiled_code, ==, NULL)) if (pat_patctl.jit != 0) { - PCRE2_JIT_COMPILE(compiled_code, pat_patctl.jit, dat_context); + PCRE2_JIT_COMPILE(compiled_code, pat_patctl.jit); } /* Output code size and other information if requested. */