com php-src: Avoid in-place conversion: ext/date/php_date.c

From: Date: Tue, 27 May 2014 21:29:37 +0000
Subject: com php-src: Avoid in-place conversion: ext/date/php_date.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78595@lists.php.net to get a copy of this message
Commit: 2dce4cb06c8ed2da0de528b20b889815f5a3dc22 Author: Dmitry Stogov <dmitry@zend.com> Wed, 28 May 2014 01:29:37 +0400 Parents: 864aa7746fee41edb1b8f655eb3c4f62916b5896 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2dce4cb06c8ed2da0de528b20b889815f5a3dc22 Log: Avoid in-place conversion Changed paths: M ext/date/php_date.c Diff: diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 493033b..37266d1 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -4107,8 +4107,7 @@ static int php_date_interval_initialize_from_hash(zval **return_value, php_inter do { \ zval *z_arg = zend_hash_str_find(myht, element, sizeof(element) - 1); \ if (z_arg) { \ - convert_to_long(z_arg); \ - (*intobj)->diff->member = (itype)Z_LVAL_P(z_arg); \ + (*intobj)->diff->member = (itype)zval_get_long(z_arg); \ } else { \ (*intobj)->diff->member = (itype)def; \ } \ @@ -4118,8 +4117,9 @@ static int php_date_interval_initialize_from_hash(zval **return_value, php_inter do { \ zval *z_arg = zend_hash_str_find(myht, element, sizeof(element) - 1); \ if (z_arg) { \ - convert_to_string(z_arg); \ - DATE_A64I((*intobj)->diff->member, Z_STRVAL_P(z_arg)); \ + zend_string *str = zval_get_string(z_arg); \ + DATE_A64I((*intobj)->diff->member, str->val); \ + STR_RELEASE(str); \ } else { \ (*intobj)->diff->member = -1LL; \ } \

« previous php.cvs (#78595) next »