Skip to content

Commit a942303

Browse files
committed
ext/pcre: Refactor php_replace_in_subject_func()
We don't need FCI anymore Make the Hashtable param const
1 parent 05e0f53 commit a942303

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/pcre/php_pcre.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,8 +2142,8 @@ static zend_always_inline zend_string *php_replace_in_subject(
21422142
}
21432143
/* }}} */
21442144

2145-
static zend_string *php_replace_in_subject_func(zend_string *regex_str, HashTable *regex_ht,
2146-
zend_fcall_info *fci, zend_fcall_info_cache *fcc,
2145+
static zend_string *php_replace_in_subject_func(zend_string *regex_str, const HashTable *regex_ht,
2146+
zend_fcall_info_cache *fcc,
21472147
zend_string *subject, size_t limit, size_t *replace_count, zend_long flags)
21482148
{
21492149
zend_string *result;
@@ -2194,7 +2194,7 @@ static size_t preg_replace_func_impl(zval *return_value,
21942194

21952195
if (subject_str) {
21962196
result = php_replace_in_subject_func(
2197-
regex_str, regex_ht, fci, fcc, subject_str, limit_val, &replace_count, flags);
2197+
regex_str, regex_ht, fcc, subject_str, limit_val, &replace_count, flags);
21982198
if (result != NULL) {
21992199
RETVAL_STR(result);
22002200
} else {
@@ -2218,7 +2218,7 @@ static size_t preg_replace_func_impl(zval *return_value,
22182218
zend_string *subject_entry_str = zval_get_tmp_string(subject_entry, &tmp_subject_entry_str);
22192219

22202220
result = php_replace_in_subject_func(
2221-
regex_str, regex_ht, fci, fcc, subject_entry_str, limit_val, &replace_count, flags);
2221+
regex_str, regex_ht, fcc, subject_entry_str, limit_val, &replace_count, flags);
22222222
if (result != NULL) {
22232223
/* Add to return array */
22242224
ZVAL_STR(&zv, result);

0 commit comments

Comments
 (0)