summaryrefslogtreecommitdiff
path: root/Zend/zend_API.h
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-11-15 19:54:19 +0300
committerDmitry Stogov <dmitry@zend.com>2018-11-15 19:54:19 +0300
commit0f7f1498be549f5988bf9d8150f35bedf70741c5 (patch)
treeb9cada88f6a43fbcf2b1316ed8386a3249b0fa4a /Zend/zend_API.h
parent8f2f80668e6988ac8907920d177e531a98dcb8b0 (diff)
downloadphp-git-0f7f1498be549f5988bf9d8150f35bedf70741c5.tar.gz
Use ZEND_THIS macro to hide implementation details in extensions code.
Diffstat (limited to 'Zend/zend_API.h')
-rw-r--r--Zend/zend_API.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 60f16b629e..a8c04658d8 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -357,7 +357,9 @@ 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_TYPE(EX(This)) == IS_OBJECT) ? &EX(This) : NULL)
+#define ZEND_THIS (&EX(This))
+
+#define getThis() ((Z_TYPE_P(ZEND_THIS) == IS_OBJECT) ? ZEND_THIS : NULL)
#define ZEND_IS_METHOD_CALL() (EX(func)->common.scope != NULL)
#define WRONG_PARAM_COUNT ZEND_WRONG_PARAM_COUNT()