diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-02-10 13:30:25 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-02-10 13:30:25 +0300 |
commit | 4241a090ada5563c89d9926897b47c0411689816 (patch) | |
tree | d127982eff2be339c3c8ad5fa6b1ba8cd4e2b333 /ext/pcre/php_pcre.h | |
parent | 0be776b1fe0b00923378bfb8b9730209265a10d5 (diff) | |
download | php-git-4241a090ada5563c89d9926897b47c0411689816.tar.gz |
Avoid reallocation in preg_replace() if nothing was replaced
Diffstat (limited to 'ext/pcre/php_pcre.h')
-rw-r--r-- | ext/pcre/php_pcre.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pcre/php_pcre.h b/ext/pcre/php_pcre.h index dc923fe62f..88f810493f 100644 --- a/ext/pcre/php_pcre.h +++ b/ext/pcre/php_pcre.h @@ -33,7 +33,7 @@ #include <locale.h> #endif -PHPAPI zend_string *php_pcre_replace(zend_string *regex, char *subject, int subject_len, zval *replace_val, int is_callable_replace, int limit, int *replace_count); +PHPAPI zend_string *php_pcre_replace(zend_string *regex, zend_string *subject_str, char *subject, int subject_len, zval *replace_val, int is_callable_replace, int limit, int *replace_count); PHPAPI pcre* pcre_get_compiled_regex(zend_string *regex, pcre_extra **extra, int *options); PHPAPI pcre* pcre_get_compiled_regex_ex(zend_string *regex, pcre_extra **extra, int *preg_options, int *coptions); @@ -59,7 +59,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex); PHPAPI void php_pcre_match_impl( pcre_cache_entry *pce, char *subject, int subject_len, zval *return_value, zval *subpats, int global, int use_flags, zend_long flags, zend_long start_offset); -PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, char *subject, int subject_len, zval *return_value, +PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *subject_str, char *subject, int subject_len, zval *return_value, int is_callable_replace, int limit, int *replace_count); PHPAPI void php_pcre_split_impl( pcre_cache_entry *pce, char *subject, int subject_len, zval *return_value, |