diff options
| author | Julien Voisin | 2020-12-24 10:32:28 +0000 |
|---|---|---|
| committer | GitHub | 2020-12-24 10:32:28 +0000 |
| commit | 98ed3be52fa15521ef405fc8029176279d80778e (patch) | |
| tree | bafe6541bb3d3863f7edb9196a3e1db40c88bf7f /src/sp_pcre_compat.h | |
| parent | a9e240ef0655175f930810cf78ac7df593a6dde6 (diff) | |
Add PHP8 support
Diffstat (limited to 'src/sp_pcre_compat.h')
| -rw-r--r-- | src/sp_pcre_compat.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/sp_pcre_compat.h b/src/sp_pcre_compat.h index 6fcb383..b70630d 100644 --- a/src/sp_pcre_compat.h +++ b/src/sp_pcre_compat.h | |||
| @@ -7,18 +7,18 @@ | |||
| 7 | #undef pcre_exec | 7 | #undef pcre_exec |
| 8 | #undef pcre_compile | 8 | #undef pcre_compile |
| 9 | 9 | ||
| 10 | #if HAVE_BUNDLED_PCRE | 10 | |
| 11 | #if PHP_VERSION_ID >= 70300 | ||
| 12 | #include "ext/pcre/php_pcre.h" | ||
| 13 | #else | ||
| 14 | #include "ext/pcre/pcrelib/pcre.h" | ||
| 15 | #endif | ||
| 16 | #else | ||
| 17 | #define PCRE2_CODE_UNIT_WIDTH 8 | 11 | #define PCRE2_CODE_UNIT_WIDTH 8 |
| 18 | #include "pcre2.h" | 12 | #if PHP_VERSION_ID >= 70300 |
| 13 | #define SP_HAS_PCRE2 | ||
| 19 | #endif | 14 | #endif |
| 15 | #include "ext/pcre/php_pcre.h" // PCRE1 | ||
| 20 | 16 | ||
| 17 | #ifdef SP_HAS_PCRE2 | ||
| 21 | #define sp_pcre pcre2_code | 18 | #define sp_pcre pcre2_code |
| 19 | #else | ||
| 20 | #define sp_pcre pcre | ||
| 21 | #endif | ||
| 22 | 22 | ||
| 23 | sp_pcre* sp_pcre_compile(const char* str); | 23 | sp_pcre* sp_pcre_compile(const char* str); |
| 24 | #define sp_is_regexp_matching_zend(regexp, zstr) \ | 24 | #define sp_is_regexp_matching_zend(regexp, zstr) \ |
