From c27bf17f634a7cb1397b9ca5e1a8f63fb25dc4f4 Mon Sep 17 00:00:00 2001 From: Matt Wilmas Date: Wed, 1 Apr 2009 17:05:36 +0000 Subject: 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?) --- ext/standard/php_string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/standard/php_string.h') 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); -- cgit v1.2.1