6d4b5747f0 ("grep: change internal *pcre* variable & function names to be *pcre1*", 2017-05-25), renamed most variables to be PCRE1 specific to give space to similarly named variables for PCRE2, but in this case the change wasn't needed as the types were compatible enough (const unsigned char* vs const uint8_t*) to be shared. Revert that change, as 94da9193a6 ("grep: add support for PCRE v2", 2017-06-01) failed to create an equivalent PCRE2 version. Signed-off-by: Carlo Marcelo Arenas Belón <carenas@xxxxxxxxx> --- grep.c | 6 +++--- grep.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/grep.c b/grep.c index f7c3a5803e..cc65f7a987 100644 --- a/grep.c +++ b/grep.c @@ -389,14 +389,14 @@ static void compile_pcre1_regexp(struct grep_pat *p, const struct grep_opt *opt) if (opt->ignore_case) { if (has_non_ascii(p->pattern)) - p->pcre1_tables = pcre_maketables(); + p->pcre_tables = pcre_maketables(); options |= PCRE_CASELESS; } if (is_utf8_locale() && has_non_ascii(p->pattern)) options |= PCRE_UTF8; p->pcre1_regexp = pcre_compile(p->pattern, options, &error, &erroffset, - p->pcre1_tables); + p->pcre_tables); if (!p->pcre1_regexp) compile_regexp_failed(p, error); @@ -462,7 +462,7 @@ static void free_pcre1_regexp(struct grep_pat *p) { pcre_free(p->pcre1_extra_info); } - pcre_free((void *)p->pcre1_tables); + pcre_free((void *)p->pcre_tables); } #else /* !USE_LIBPCRE1 */ static void compile_pcre1_regexp(struct grep_pat *p, const struct grep_opt *opt) diff --git a/grep.h b/grep.h index 1875880f37..d34f66b384 100644 --- a/grep.h +++ b/grep.h @@ -89,7 +89,7 @@ struct grep_pat { pcre *pcre1_regexp; pcre_extra *pcre1_extra_info; pcre_jit_stack *pcre1_jit_stack; - const unsigned char *pcre1_tables; + const unsigned char *pcre_tables; int pcre1_jit_on; pcre2_code *pcre2_pattern; pcre2_match_data *pcre2_match_data; -- 2.22.0