1
0
mirror of https://github.com/php/php-src.git synced 2026-04-30 03:33:17 +02:00

Avoid in-place conversion

This commit is contained in:
Dmitry Stogov
2014-05-28 01:29:37 +04:00
parent 864aa7746f
commit 2dce4cb06c
+4 -4
View File
@@ -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; \
} \