diff options
author | Matt Wilmas <mattwil@php.net> | 2009-04-01 17:05:36 +0000 |
---|---|---|
committer | Matt Wilmas <mattwil@php.net> | 2009-04-01 17:05:36 +0000 |
commit | c27bf17f634a7cb1397b9ca5e1a8f63fb25dc4f4 (patch) | |
tree | 2400fc78254afb1385187ca5cc27888dfaab0182 /ext/standard/php_string.h | |
parent | dc683c85f4f219f0d58b03bd1eaf0bfbe959176e (diff) | |
download | php-git-c27bf17f634a7cb1397b9ca5e1a8f63fb25dc4f4.tar.gz |
MFH: explode() stuff:
- Fixed bug #47560 (explode()'s limit parameter odd behaviour) by reverting change for bug #47546
- Changed int to long where needed (should fix memory errors from overflow seen in bug #47854)
- Simplified logic a bit with limit and its default value
- php_explode_negative_limit(): removed safe_emalloc (not needed; plain erealloc is used later)
- Moved declarations/allocation to optimize if the delimiter isn't found
- Changed ALLOC_STEP size for less realloc's (and maybe better memory block alignment?)
Diffstat (limited to 'ext/standard/php_string.h')
-rw-r--r-- | ext/standard/php_string.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/php_string.h b/ext/standard/php_string.h index ba03aeee5f..526c04954d 100644 --- a/ext/standard/php_string.h +++ b/ext/standard/php_string.h @@ -138,7 +138,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, int len, int *stateptr, char *allow, PHPAPI int php_char_to_str_ex(char *str, uint len, char from, char *to, int to_len, zval *result, int case_sensitivity, int *replace_count); PHPAPI int php_char_to_str(char *str, uint len, char from, char *to, int to_len, zval *result); PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value TSRMLS_DC); -PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, int limit); +PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, long limit); PHPAPI size_t php_strspn(char *s1, char *s2, char *s1_end, char *s2_end); PHPAPI size_t php_strcspn(char *s1, char *s2, char *s1_end, char *s2_end); |