summaryrefslogtreecommitdiff
path: root/Zend/zend_API.h
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2016-04-01 16:17:49 +0300
committerDmitry Stogov <dmitry@zend.com>2016-04-01 16:17:49 +0300
commit7abfaac901684da8bdcbccf43682a5557085c917 (patch)
tree88c9d1a568c3638a070ea21247e8d0213f26d878 /Zend/zend_API.h
parentc72282a13b12b7e572469eba7a7ce593d900a8a2 (diff)
downloadphp-git-7abfaac901684da8bdcbccf43682a5557085c917.tar.gz
Merge zend_execute_data->called_scope into zend_execute_data->This.
"called_scope" made sense only for static method calls, for dynamic calls it was always equal to the class of $this. Now EG(This) may store IS_OBJECT + $this or IS_UNUSED + "called_scope" (of course, "called_scope" may be NULL). Some code might need to be adopted to support this change. Checks (Z_OBJ(EX(This))) might need to be converted into (Z_TYPE(EX(This)) == IS_OBJECT).
Diffstat (limited to 'Zend/zend_API.h')
-rw-r--r--Zend/zend_API.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 40c814f71d..07b48365f3 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -358,7 +358,7 @@ ZEND_API zval *zend_read_static_property(zend_class_entry *scope, const char *na
ZEND_API char *zend_get_type_by_const(int type);
-#define getThis() (Z_OBJ(EX(This)) ? &EX(This) : NULL)
+#define getThis() ((Z_TYPE(EX(This)) == IS_OBJECT) ? &EX(This) : NULL)
#define ZEND_IS_METHOD_CALL() (EX(func)->common.scope != NULL)
#define WRONG_PARAM_COUNT ZEND_WRONG_PARAM_COUNT()