com php-src: Better name: ZEND_PROPERTY_HAS => ZEND _PROPERTY_NOT_EMPTY: Zend/zend_object_handlers. c Zend/zend_object_handlers.h ext/mysqli/mysqli.c
| From: | Dmitry Stogov | Date: | Tue, 24 Jul 2018 06:31:57 +0000 |
| Subject: | com php-src: Better name: ZEND_PROPERTY_HAS => ZEND _PROPERTY_NOT_EMPTY: Zend/zend_object_handlers. c Zend/zend_object_handlers.h ext/mysqli/mysqli.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-102665@lists.php.net to get a copy of this message | ||
Commit: d775fe33d168ca32b964d29f82a74f41fe8ec2a8
Author: Dmitry Stogov <dmitry@zend.com> Tue, 24 Jul 2018 09:31:57 +0300
Parents: 1638a6e1186242c2fc35844cc1273031587cd2bb
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d775fe33d168ca32b964d29f82a74f41fe8ec2a8
Log:
Better name: ZEND_PROPERTY_HAS => ZEND_PROPERTY_NOT_EMPTY
Changed paths:
M Zend/zend_object_handlers.c
M Zend/zend_object_handlers.h
M ext/mysqli/mysqli.c
Diff:
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index cb77103..9349ce5 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -1664,7 +1664,7 @@ found:
case ZEND_PROPERTY_EXISTS:
result = 1;
break;
- case ZEND_PROPERTY_HAS:
+ case ZEND_PROPERTY_NOT_EMPTY:
default:
result = zend_is_true(value);
break;
@@ -1695,7 +1695,7 @@ found:
if (Z_TYPE(rv) != IS_UNDEF) {
result = zend_is_true(&rv);
zval_ptr_dtor(&rv);
- if (has_set_exists == ZEND_PROPERTY_HAS && result) {
+ if (has_set_exists == ZEND_PROPERTY_NOT_EMPTY && result) {
if (EXPECTED(!EG(exception)) && zobj->ce->__get && !((*guard) &
IN_GET)) {
(*guard) |= IN_GET;
zend_std_call_getter(zobj, member, &rv);
diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h
index 26b16ad..3598fd4 100644
--- a/Zend/zend_object_handlers.h
+++ b/Zend/zend_object_handlers.h
@@ -173,9 +173,9 @@ extern const ZEND_API zend_object_handlers std_object_handlers;
#define zend_get_function_root_class(fbc) \
((fbc)->common.prototype ? (fbc)->common.prototype->common.scope :
(fbc)->common.scope)
-#define ZEND_PROPERTY_ISSET 0x0 /* Property is exists and not NULL */
-#define ZEND_PROPERTY_HAS 0x1 /* Property is exists and is TRUE */
-#define ZEND_PROPERTY_EXISTS 0x2 /* Property is exists */
+#define ZEND_PROPERTY_ISSET 0x0 /* Property exists and is not NULL */
+#define ZEND_PROPERTY_NOT_EMPTY ZEND_ISEMPTY /* Property is not empty */
+#define ZEND_PROPERTY_EXISTS 0x2 /* Property exists */
ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string
*function_name_strval, const zval *key);
ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name,
zend_bool silent);
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 4a32fb4..a1e880a 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -385,7 +385,7 @@ static int mysqli_object_has_property(zval *object, zval *member, int has_set_ex
case ZEND_PROPERTY_EXISTS:
ret = 1;
break;
- case ZEND_PROPERTY_HAS: {
+ case ZEND_PROPERTY_NOT_EMPTY: {
zval rv;
zval *value = mysqli_read_property(object, member, BP_VAR_IS, cache_slot, &rv);
if (value != &EG(uninitialized_zval)) {