summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorGuilherme Blanco <guilhermeblanco@hotmail.com>2015-02-12 23:19:14 +0100
committerNikita Popov <nikic@php.net>2015-02-12 23:20:19 +0100
commit8c81d80e10e0f189307fc8ff4a8fb34bd0cb1fcb (patch)
tree962ecf3dbea41b0d4d539a60498b6942304bd844 /ext/reflection/php_reflection.c
parenta0d472e1dad4a1cb719ba56a1ca4da19fadfdfb3 (diff)
downloadphp-git-8c81d80e10e0f189307fc8ff4a8fb34bd0cb1fcb.tar.gz
Made ZEND_ACC_TRAIT a saner value
CC_TRAIT valued as 0x120 is too magical to be comprehensible by others.
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 92b5d9da5f..309b10c1bb 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -374,7 +374,7 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in
char *kind = "Class";
if (ce->ce_flags & ZEND_ACC_INTERFACE) {
kind = "Interface";
- } else if ((ce->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) {
+ } else if (ce->ce_flags & ZEND_ACC_TRAIT) {
kind = "Trait";
}
string_printf(str, "%s%s [ ", indent, kind);
@@ -389,7 +389,7 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in
}
if (ce->ce_flags & ZEND_ACC_INTERFACE) {
string_printf(str, "interface ");
- } else if ((ce->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) {
+ } else if (ce->ce_flags & ZEND_ACC_TRAIT) {
string_printf(str, "trait ");
} else {
if (ce->ce_flags & (ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) {
@@ -4143,7 +4143,7 @@ ZEND_METHOD(reflection_class, isInterface)
Returns whether this is a trait */
ZEND_METHOD(reflection_class, isTrait)
{
- _class_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_TRAIT & ~ZEND_ACC_EXPLICIT_ABSTRACT_CLASS);
+ _class_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_TRAIT);
}
/* }}} */