diff options
| author | Anatol Belski <ab@php.net> | 2014-09-19 12:36:23 +0200 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2014-09-19 12:36:23 +0200 |
| commit | d8de53d498cf75936c9cd6781456c39b01f5af60 (patch) | |
| tree | dbed4b793f209185395a76ba4941946c2df0c6b6 /ext/pcre/php_pcre.c | |
| parent | babcad063f3042d5fb374b5013c5c742407c1bd2 (diff) | |
| download | php-git-d8de53d498cf75936c9cd6781456c39b01f5af60.tar.gz | |
avoid unnecessary strlen calls in loop
Diffstat (limited to 'ext/pcre/php_pcre.c')
| -rw-r--r-- | ext/pcre/php_pcre.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 89c5f1155b..0af6c5e3d7 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -782,7 +782,7 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec } /* Add MARK, if available */ if (mark) { - add_assoc_string(&result_set, "MARK", (char *) mark); + add_assoc_string_ex(&result_set, "MARK", sizeof("MARK") - 1, (char *)mark); } /* And add it to the output array */ zend_hash_next_index_insert(Z_ARRVAL_P(subpats), &result_set); @@ -822,7 +822,7 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec } /* Add MARK, if available */ if (mark) { - add_assoc_string(subpats, "MARK", (char *) mark); + add_assoc_string_ex(subpats, "MARK", sizeof("MARK") - 1, (char *)mark); } } |
