diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-09-05 13:16:10 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-09-05 13:16:10 +0300 |
commit | 8939c4d96b8382abe84f35e69f4f6ebd6f0f749d (patch) | |
tree | f54257485cb7b552f9532ced071e3ab8ca558264 /ext/reflection/php_reflection.c | |
parent | 6c1ff61a368a26c8f2cbf383aa8a26fc30cf59ef (diff) | |
download | php-git-8939c4d96b8382abe84f35e69f4f6ebd6f0f749d.tar.gz |
Get rid of ZEND_ACC_CTOR, ZEND_ACC_DTOR and ZEND_ACC_IMPLEMENTED_ABSTRACT
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index e20479837b..8fe8da071a 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -472,7 +472,7 @@ static void _class_string(smart_str *str, zend_class_entry *ce, zval *obj, char size_t len = ZSTR_LEN(mptr->common.function_name); /* Do not display old-style inherited constructors */ - if ((mptr->common.fn_flags & ZEND_ACC_CTOR) == 0 + if (mptr->common.scope->constructor != mptr || mptr->common.scope == ce || !key || zend_binary_strcasecmp(ZSTR_VAL(key), ZSTR_LEN(key), ZSTR_VAL(mptr->common.function_name), len) == 0) @@ -744,10 +744,10 @@ static void _function_string(smart_str *str, zend_function *fptr, zend_class_ent if (fptr->common.prototype && fptr->common.prototype->common.scope) { smart_str_append_printf(str, ", prototype %s", ZSTR_VAL(fptr->common.prototype->common.scope->name)); } - if (fptr->common.fn_flags & ZEND_ACC_CTOR) { + if (fptr->common.scope && fptr->common.scope->constructor == fptr) { smart_str_appends(str, ", ctor"); } - if (fptr->common.fn_flags & ZEND_ACC_DTOR) { + if (fptr->common.scope && fptr->common.scope->destructor == fptr) { smart_str_appends(str, ", dtor"); } smart_str_appends(str, "> "); @@ -3407,7 +3407,7 @@ ZEND_METHOD(reflection_method, isConstructor) /* we need to check if the ctor is the ctor of the class level we we * looking at since we might be looking at an inherited old style ctor * defined in base class. */ - RETURN_BOOL(mptr->common.fn_flags & ZEND_ACC_CTOR && intern->ce->constructor && intern->ce->constructor->common.scope == mptr->common.scope); + RETURN_BOOL(intern->ce->constructor == mptr); } /* }}} */ @@ -3422,7 +3422,7 @@ ZEND_METHOD(reflection_method, isDestructor) return; } GET_REFLECTION_OBJECT_PTR(mptr); - RETURN_BOOL(mptr->common.fn_flags & ZEND_ACC_DTOR); + RETURN_BOOL(intern->ce->destructor == mptr); } /* }}} */ |