]> git.ipfire.org Git - thirdparty/git.git/blobdiff - grep.h
t1415: set REFFILES for test specific to storage format
[thirdparty/git.git] / grep.h
diff --git a/grep.h b/grep.h
index ae89d6254b3e933e0912e1b551e50cf9b8e01cb8..72f82b1e302397b20f8ae4ebd75a0b534fff99f5 100644 (file)
--- a/grep.h
+++ b/grep.h
@@ -4,10 +4,17 @@
 #ifdef USE_LIBPCRE2
 #define PCRE2_CODE_UNIT_WIDTH 8
 #include <pcre2.h>
+#if (PCRE2_MAJOR >= 10 && PCRE2_MINOR >= 36) || PCRE2_MAJOR >= 11
+#define GIT_PCRE2_VERSION_10_36_OR_HIGHER
+#endif
+#if (PCRE2_MAJOR >= 10 && PCRE2_MINOR >= 34) || PCRE2_MAJOR >= 11
+#define GIT_PCRE2_VERSION_10_34_OR_HIGHER
+#endif
 #else
 typedef int pcre2_code;
 typedef int pcre2_match_data;
 typedef int pcre2_compile_context;
+typedef int pcre2_general_context;
 #endif
 #ifndef PCRE2_MATCH_INVALID_UTF
 /* PCRE2_MATCH_* dummy also with !USE_LIBPCRE2, for test-pcre2-config.c */
@@ -69,6 +76,7 @@ struct grep_pat {
        pcre2_code *pcre2_pattern;
        pcre2_match_data *pcre2_match_data;
        pcre2_compile_context *pcre2_compile_context;
+       pcre2_general_context *pcre2_general_context;
        const uint8_t *pcre2_tables;
        uint32_t pcre2_jit_on;
        unsigned fixed:1;
@@ -161,7 +169,6 @@ struct grep_opt {
 
 int grep_config(const char *var, const char *value, void *);
 void grep_init(struct grep_opt *, struct repository *repo, const char *prefix);
-void grep_destroy(void);
 void grep_commit_pattern_type(enum grep_pattern_type, struct grep_opt *opt);
 
 void append_grep_pat(struct grep_opt *opt, const char *pat, size_t patlen, const char *origin, int no, enum grep_pat_token t);