diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-04-15 15:40:40 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-04-15 15:40:40 +0400 |
commit | 050d7e38ad4163e7fa65e26724d3516ce7b33601 (patch) | |
tree | 2bb49b1b73c37b35fc778e83d9353f0eb9cc12a3 /ext/mbstring/php_mbregex.c | |
parent | 93d3a613d82d32dd6f5499e211bfe194d60898b0 (diff) | |
download | php-git-050d7e38ad4163e7fa65e26724d3516ce7b33601.tar.gz |
Cleanup (1-st round)
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r-- | ext/mbstring/php_mbregex.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 9a82f10104..223ecffc2a 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -749,7 +749,7 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase) beg = regs->beg[i]; end = regs->end[i]; if (beg >= 0 && beg < end && end <= string_len) { - add_index_stringl(array, i, (char *)&str[beg], end - beg, 1); + add_index_stringl(array, i, (char *)&str[beg], end - beg); } else { add_index_bool(array, i, 0); } @@ -959,7 +959,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp array_init(&subpats); for (i = 0; i < regs->num_regs; i++) { - add_next_index_stringl(&subpats, string + regs->beg[i], regs->end[i] - regs->beg[i], 1); + add_next_index_stringl(&subpats, string + regs->beg[i], regs->end[i] - regs->beg[i]); } ZVAL_COPY_VALUE(&args[0], &subpats); @@ -1092,7 +1092,7 @@ PHP_FUNCTION(mb_split) /* add it to the array */ if ((pos - (OnigUChar *)string) < end) { if (beg < string_len && beg >= (chunk_pos - (OnigUChar *)string)) { - add_next_index_stringl(return_value, (char *)chunk_pos, ((OnigUChar *)(string + beg) - chunk_pos), 1); + add_next_index_stringl(return_value, (char *)chunk_pos, ((OnigUChar *)(string + beg) - chunk_pos)); --count; } else { err = -2; @@ -1120,9 +1120,9 @@ PHP_FUNCTION(mb_split) /* otherwise we just have one last element to add to the array */ n = ((OnigUChar *)(string + string_len) - chunk_pos); if (n > 0) { - add_next_index_stringl(return_value, (char *)chunk_pos, n, 1); + add_next_index_stringl(return_value, (char *)chunk_pos, n); } else { - add_next_index_stringl(return_value, "", 0, 1); + add_next_index_stringl(return_value, "", 0); } } /* }}} */ @@ -1256,7 +1256,7 @@ _php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAMETERS, int mode) beg = MBREX(search_regs)->beg[i]; end = MBREX(search_regs)->end[i]; if (beg >= 0 && beg <= end && end <= len) { - add_index_stringl(return_value, i, (char *)&str[beg], end - beg, 1); + add_index_stringl(return_value, i, (char *)&str[beg], end - beg); } else { add_index_bool(return_value, i, 0); } @@ -1375,7 +1375,7 @@ PHP_FUNCTION(mb_ereg_search_getregs) beg = MBREX(search_regs)->beg[i]; end = MBREX(search_regs)->end[i]; if (beg >= 0 && beg <= end && end <= len) { - add_index_stringl(return_value, i, (char *)&str[beg], end - beg, 1); + add_index_stringl(return_value, i, (char *)&str[beg], end - beg); } else { add_index_bool(return_value, i, 0); } |