diff options
| author | jvoisin | 2021-01-01 16:31:33 +0100 |
|---|---|---|
| committer | jvoisin | 2021-01-01 16:31:33 +0100 |
| commit | 837fbdb88a513500520f057d27bdfedd0d3995ca (patch) | |
| tree | a311472f26ac4358f5c03311ea37e99e7d4facd7 /src/sp_pcre_compat.c | |
| parent | 0127dd9b9d1d81dbeb674bd956a10fbd83f42cdd (diff) | |
Constify a function
Diffstat (limited to 'src/sp_pcre_compat.c')
| -rw-r--r-- | src/sp_pcre_compat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c index d2efc71..b4d29f0 100644 --- a/src/sp_pcre_compat.c +++ b/src/sp_pcre_compat.c | |||
| @@ -14,7 +14,8 @@ sp_pcre* sp_pcre_compile(const char* const pattern) { | |||
| 14 | #else | 14 | #else |
| 15 | const char* pcre_error = NULL; | 15 | const char* pcre_error = NULL; |
| 16 | int erroroffset; | 16 | int erroroffset; |
| 17 | ret = php_pcre_compile(pattern, PCRE_CASELESS, &pcre_error, &erroroffset, NULL); | 17 | ret = |
| 18 | php_pcre_compile(pattern, PCRE_CASELESS, &pcre_error, &erroroffset, NULL); | ||
| 18 | #endif | 19 | #endif |
| 19 | 20 | ||
| 20 | if (NULL == ret) { | 21 | if (NULL == ret) { |
| @@ -37,7 +38,8 @@ bool ZEND_HOT sp_is_regexp_matching_len(const sp_pcre* regexp, const char* str, | |||
| 37 | ret = pcre2_match(regexp, (PCRE2_SPTR)str, len, 0, 0, match_data, NULL); | 38 | ret = pcre2_match(regexp, (PCRE2_SPTR)str, len, 0, 0, match_data, NULL); |
| 38 | #else | 39 | #else |
| 39 | int vec[30]; | 40 | int vec[30]; |
| 40 | ret = php_pcre_exec(regexp, NULL, str, len, 0, 0, vec, sizeof(vec) / sizeof(int)); | 41 | ret = php_pcre_exec(regexp, NULL, str, len, 0, 0, vec, |
| 42 | sizeof(vec) / sizeof(int)); | ||
| 41 | #endif | 43 | #endif |
| 42 | 44 | ||
| 43 | if (ret < 0) { | 45 | if (ret < 0) { |
