diff options
author | Michele Calgaro <[email protected]> | 2024-08-18 20:53:07 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-08-18 23:20:10 +0900 |
commit | 51fdc21a48e4e576f83a778a93d3f1e52732d88a (patch) | |
tree | 0f7dde76082772729b5d1a567e8e269dbb1a1058 /twin/compton-tde/c2.h | |
parent | e2ed07078655c4ee47d532f0d72d4320cbfdce42 (diff) | |
download | tdebase-51fdc21a48e4e576f83a778a93d3f1e52732d88a.tar.gz tdebase-51fdc21a48e4e576f83a778a93d3f1e52732d88a.zip |
twin compton: use libpcre2 instead of libpcre
Signed-off-by: Michele Calgaro <[email protected]>
(cherry picked from commit 2bc7176522c8cb2b154894312e2687686d7885d8)
Diffstat (limited to 'twin/compton-tde/c2.h')
-rw-r--r-- | twin/compton-tde/c2.h | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/twin/compton-tde/c2.h b/twin/compton-tde/c2.h index 9e04c09a8..c84836c25 100644 --- a/twin/compton-tde/c2.h +++ b/twin/compton-tde/c2.h @@ -13,18 +13,10 @@ #include <fnmatch.h> #include <ctype.h> -// libpcre -#ifdef CONFIG_REGEX_PCRE -#include <pcre.h> - -// For compatiblity with <libpcre-8.20 -#ifndef PCRE_STUDY_JIT_COMPILE -#define PCRE_STUDY_JIT_COMPILE 0 -#define LPCRE_FREE_STUDY(extra) pcre_free(extra) -#else -#define LPCRE_FREE_STUDY(extra) pcre_free_study(extra) -#endif - +// libpcre2 +#ifdef CONFIG_REGEX_PCRE2 +#define PCRE2_CODE_UNIT_WIDTH 8 +#include <pcre2.h> #endif #define C2_MAX_LEVELS 10 @@ -139,9 +131,8 @@ struct _c2_l { } ptntype; char *ptnstr; long ptnint; -#ifdef CONFIG_REGEX_PCRE - pcre *regex_pcre; - pcre_extra *regex_pcre_extra; +#ifdef CONFIG_REGEX_PCRE2 + pcre2_code *regex_pcre; #endif }; |