diff options
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index f4f99432fd..63f558d057 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -67,7 +67,7 @@ ZEND_TLS pcre2_general_context *gctx = NULL; ZEND_TLS pcre2_compile_context *cctx = NULL; ZEND_TLS pcre2_match_context *mctx = NULL; ZEND_TLS pcre2_match_data *mdata = NULL; -ZEND_TLS zend_bool mdata_used = 0; +ZEND_TLS bool mdata_used = 0; ZEND_TLS uint8_t pcre2_init_ok = 0; #if defined(ZTS) && defined(HAVE_PCRE_JIT_SUPPORT) static MUTEX_T pcre_mt = NULL; @@ -999,7 +999,7 @@ static inline void populate_match_value( } static inline void add_named( - zval *subpats, zend_string *name, zval *val, zend_bool unmatched) { + zval *subpats, zend_string *name, zval *val, bool unmatched) { /* If the DUPNAMES option is used, multiple subpatterns might have the same name. * In this case we want to preserve the one that actually has a value. */ if (!unmatched) { @@ -1049,8 +1049,8 @@ static inline void add_offset_pair( static void populate_subpat_array( zval *subpats, const char *subject, PCRE2_SIZE *offsets, zend_string **subpat_names, uint32_t num_subpats, int count, const PCRE2_SPTR mark, zend_long flags) { - zend_bool offset_capture = (flags & PREG_OFFSET_CAPTURE) != 0; - zend_bool unmatched_as_null = (flags & PREG_UNMATCHED_AS_NULL) != 0; + bool offset_capture = (flags & PREG_OFFSET_CAPTURE) != 0; + bool unmatched_as_null = (flags & PREG_UNMATCHED_AS_NULL) != 0; zval val; int i; if (subpat_names) { @@ -1145,7 +1145,7 @@ static void php_do_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) /* {{{ * } /* }}} */ -static zend_always_inline zend_bool is_known_valid_utf8( +static zend_always_inline bool is_known_valid_utf8( zend_string *subject_str, PCRE2_SIZE start_offset) { if (!(GC_FLAGS(subject_str) & IS_STR_VALID_UTF8)) { /* We don't know whether the string is valid UTF-8 or not. */ @@ -1659,7 +1659,7 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su piece = subject + last_end_offset; if (count >= 0 && limit > 0) { - zend_bool simple_string; + bool simple_string; /* Check for too many substrings condition. */ if (UNEXPECTED(count == 0)) { @@ -1858,7 +1858,7 @@ static zend_string *php_pcre_replace_func_impl(pcre_cache_entry *pce, zend_strin zend_string *result; /* Result of replacement */ zend_string *eval_result; /* Result of custom function */ pcre2_match_data *match_data; - zend_bool old_mdata_used; + bool old_mdata_used; /* Calculate the size of the offsets array, and allocate memory for it. */ num_subpats = pce->capture_count + 1; @@ -2732,7 +2732,7 @@ PHP_FUNCTION(preg_quote) ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR(str) Z_PARAM_OPTIONAL - Z_PARAM_STR_EX(delim, 1, 0) + Z_PARAM_STR_OR_NULL(delim) ZEND_PARSE_PARAMETERS_END(); /* Nothing to do if we got an empty string */ @@ -2885,7 +2885,7 @@ PHPAPI void php_pcre_grep_impl(pcre_cache_entry *pce, zval *input, zval *return uint32_t options; /* Execution options */ zend_string *string_key; zend_ulong num_key; - zend_bool invert; /* Whether to return non-matching + bool invert; /* Whether to return non-matching entries */ pcre2_match_data *match_data; invert = flags & PREG_GREP_INVERT ? 1 : 0; |