com php-src: Use smart_str_append_long in implode: ext/standard/string.c

From: Date: Wed, 28 May 2014 16:39:41 +0000
Subject: com php-src: Use smart_str_append_long in implode: ext/standard/string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78618@lists.php.net to get a copy of this message
Commit: bf5a59d281f5c799b4183746906779303c61296b Author: Nikita Popov <nikic@php.net> Wed, 28 May 2014 18:39:41 +0200 Parents: 3f27d707d2b699e9266ead73605b8191226e5439 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bf5a59d281f5c799b4183746906779303c61296b Log: Use smart_str_append_long in implode Changed paths: M ext/standard/string.c Diff: diff --git a/ext/standard/string.c b/ext/standard/string.c index 913d5b3..674bd58 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1139,11 +1139,8 @@ again: smart_str_appendl(&implstr, Z_STRVAL_P(tmp), Z_STRLEN_P(tmp)); break; - case IS_LONG: { - char stmp[MAX_LENGTH_OF_LONG + 1]; - str_len = slprintf(stmp, sizeof(stmp), "%ld", Z_LVAL_P(tmp)); - smart_str_appendl(&implstr, stmp, str_len); - } + case IS_LONG: + smart_str_append_long(&implstr, Z_LVAL_P(tmp)); break; case IS_TRUE:

« previous php.cvs (#78618) next »