diff options
| author | jvoisin | 2020-12-13 16:26:19 +0100 |
|---|---|---|
| committer | jvoisin | 2020-12-13 16:26:19 +0100 |
| commit | efec261b07e76f6c3e53beb831bbc2c65d8884d3 (patch) | |
| tree | 50757bc6d8540124c70e8f81514c84f34eee4c89 /src/sp_pcre_compat.h | |
| parent | 5329a55bfd2b00d617a40d587cd37050d964ccbf (diff) | |
Get rid of pcre1
Diffstat (limited to 'src/sp_pcre_compat.h')
| -rw-r--r-- | src/sp_pcre_compat.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/sp_pcre_compat.h b/src/sp_pcre_compat.h index b429683..6fcb383 100644 --- a/src/sp_pcre_compat.h +++ b/src/sp_pcre_compat.h | |||
| @@ -7,26 +7,18 @@ | |||
| 7 | #undef pcre_exec | 7 | #undef pcre_exec |
| 8 | #undef pcre_compile | 8 | #undef pcre_compile |
| 9 | 9 | ||
| 10 | /* We're not supporting pcre when it's not bundled with php7, | ||
| 11 | * yet. Pull-requests are welcome. */ | ||
| 12 | #if HAVE_BUNDLED_PCRE | 10 | #if HAVE_BUNDLED_PCRE |
| 13 | #if PHP_VERSION_ID >= 70300 | 11 | #if PHP_VERSION_ID >= 70300 |
| 14 | #define SP_HAS_PCRE2 | ||
| 15 | #include "ext/pcre/php_pcre.h" | 12 | #include "ext/pcre/php_pcre.h" |
| 16 | #else | 13 | #else |
| 17 | #include "ext/pcre/pcrelib/pcre.h" | 14 | #include "ext/pcre/pcrelib/pcre.h" |
| 18 | #endif | 15 | #endif |
| 19 | #else | 16 | #else |
| 20 | #define SP_HAS_PCRE2 | ||
| 21 | #define PCRE2_CODE_UNIT_WIDTH 8 | 17 | #define PCRE2_CODE_UNIT_WIDTH 8 |
| 22 | #include "pcre2.h" | 18 | #include "pcre2.h" |
| 23 | #endif | 19 | #endif |
| 24 | 20 | ||
| 25 | #ifdef SP_HAS_PCRE2 | ||
| 26 | #define sp_pcre pcre2_code | 21 | #define sp_pcre pcre2_code |
| 27 | #else | ||
| 28 | #define sp_pcre pcre | ||
| 29 | #endif | ||
| 30 | 22 | ||
| 31 | sp_pcre* sp_pcre_compile(const char* str); | 23 | sp_pcre* sp_pcre_compile(const char* str); |
| 32 | #define sp_is_regexp_matching_zend(regexp, zstr) \ | 24 | #define sp_is_regexp_matching_zend(regexp, zstr) \ |
