diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-05-28 01:29:37 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-05-28 01:29:37 +0400 |
commit | 2dce4cb06c8ed2da0de528b20b889815f5a3dc22 (patch) | |
tree | 78e17697aba33cdd1015518f5bf4de033c79acd4 | |
parent | 864aa7746fee41edb1b8f655eb3c4f62916b5896 (diff) | |
download | php-git-2dce4cb06c8ed2da0de528b20b889815f5a3dc22.tar.gz |
Avoid in-place conversion
-rw-r--r-- | ext/date/php_date.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 493033b60b..37266d17b5 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; \ } \ |