com php-src: cleanup tmp_member handling: Zend/zend_o bject_handlers.c

From: Date: Thu, 10 Sep 2015 06:39:25 +0000
Subject: com php-src: cleanup tmp_member handling: Zend/zend_o bject_handlers.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-88983@lists.php.net to get a copy of this message
Commit: 6852f9cd437a64d15bcd629f38cd9d7c8f0f0996 Author: Xinchen Hui <laruence@gmail.com> Thu, 10 Sep 2015 14:39:25 +0800 Parents: 27f6b8864e8506d3adca32810e350a132150ed03 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6852f9cd437a64d15bcd629f38cd9d7c8f0f0996 Log: cleanup tmp_member handling Changed paths: M Zend/zend_object_handlers.c Diff: diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 32534d0..14a68a8 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -602,11 +602,10 @@ zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_ retval = &EG(uninitialized_zval); exit: - if (UNEXPECTED(Z_TYPE(tmp_member) != IS_UNDEF)) { - if (Z_REFCOUNTED_P(retval)) Z_ADDREF_P(retval); + if (Z_REFCOUNTED(tmp_member)) { zval_ptr_dtor(&tmp_member); - if (Z_REFCOUNTED_P(retval)) Z_DELREF_P(retval); } + return retval; } /* }}} */ @@ -703,7 +702,7 @@ write_std_property: } exit: - if (UNEXPECTED(Z_TYPE(tmp_member) != IS_UNDEF)) { + if (Z_REFCOUNTED(tmp_member)) { zval_ptr_dtor(&tmp_member); } } @@ -935,7 +934,7 @@ static void zend_std_unset_property(zval *object, zval *member, void **cache_slo } exit: - if (UNEXPECTED(Z_TYPE(tmp_member) != IS_NULL)) { + if (Z_REFCOUNTED(tmp_member)) { zval_ptr_dtor(&tmp_member); } } @@ -1507,7 +1506,7 @@ found: } exit: - if (UNEXPECTED(Z_TYPE(tmp_member) != IS_UNDEF)) { + if (Z_REFCOUNTED(tmp_member)) { zval_ptr_dtor(&tmp_member); } return result;

« previous php.cvs (#88983) next »