diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-02-06 10:51:45 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-02-06 10:53:12 +0100 |
commit | 53e527ad433db13c31e52a9bf5f598aa92c9ab98 (patch) | |
tree | 5861e85a66891bde858528cd54025f5909704778 /Zend/zend_inheritance.c | |
parent | 40d615b24b50d3149aed0ccd13305ac7af6a4600 (diff) | |
download | php-git-53e527ad433db13c31e52a9bf5f598aa92c9ab98.tar.gz |
Remove ZEND_ACC_IMPLEMENT_INTERFACES flag
This is equivalent to checking ce->num_interfaces. The only subtle
moment is during inheritance, where num_interface may change when
parent interfaces are inherited. The check in zend_do_link_class
thus uses "interfaces", not "ce->num_interfaces".
Diffstat (limited to 'Zend/zend_inheritance.c')
-rw-r--r-- | Zend/zend_inheritance.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index a381fced2d..5abe1c55d4 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -1161,7 +1161,7 @@ ZEND_API void zend_do_inheritance_ex(zend_class_entry *ce, zend_class_entry *par /* Inherit interfaces */ if (parent_ce->num_interfaces) { - if (!(ce->ce_flags & ZEND_ACC_IMPLEMENT_INTERFACES)) { + if (!ce->num_interfaces) { zend_do_inherit_interfaces(ce, parent_ce); } else { uint32_t i; @@ -2463,7 +2463,7 @@ ZEND_API int zend_do_link_class(zend_class_entry *ce, zend_string *lc_parent_nam if (ce->num_traits) { zend_do_bind_traits(ce); } - if (ce->ce_flags & ZEND_ACC_IMPLEMENT_INTERFACES) { + if (interfaces) { zend_do_implement_interfaces(ce, interfaces); } if ((ce->ce_flags & (ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_INTERFACE|ZEND_ACC_TRAIT|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) == ZEND_ACC_IMPLICIT_ABSTRACT_CLASS) { |