diff options
author | Guilherme Blanco <guilhermeblanco@hotmail.com> | 2014-11-22 04:57:55 +0000 |
---|---|---|
committer | Julien Pauli <jpauli@php.net> | 2014-12-12 17:29:54 +0100 |
commit | 094d409b3d34c51f49e0121e5ccfe8b2a717aaf6 (patch) | |
tree | db03022fa8f4eda77977af84c45bcc0eb33d9fa0 /ext/reflection/php_reflection.c | |
parent | 5ad01e1d33fc669608f09cc55e0db373b89a7546 (diff) | |
download | php-git-094d409b3d34c51f49e0121e5ccfe8b2a717aaf6.tar.gz |
Removed ZEND_ACC_FINAL_CLASS which is unnecessary. This also fixed some currently defined classes as final which were just not being considered as such before.
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 18906d6004..026680cd6d 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -395,7 +395,7 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in if (ce->ce_flags & (ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) { string_printf(str, "abstract "); } - if (ce->ce_flags & ZEND_ACC_FINAL_CLASS) { + if (ce->ce_flags & ZEND_ACC_FINAL) { string_printf(str, "final "); } string_printf(str, "class "); @@ -1557,7 +1557,7 @@ ZEND_METHOD(reflection, getModifierNames) if (modifiers & (ZEND_ACC_ABSTRACT | ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) { add_next_index_stringl(return_value, "abstract", sizeof("abstract")-1); } - if (modifiers & (ZEND_ACC_FINAL | ZEND_ACC_FINAL_CLASS)) { + if (modifiers & ZEND_ACC_FINAL) { add_next_index_stringl(return_value, "final", sizeof("final")-1); } if (modifiers & ZEND_ACC_IMPLICIT_PUBLIC) { @@ -4162,7 +4162,7 @@ ZEND_METHOD(reflection_class, isTrait) Returns whether this class is final */ ZEND_METHOD(reflection_class, isFinal) { - _class_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_FINAL_CLASS); + _class_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_FINAL); } /* }}} */ @@ -4290,7 +4290,7 @@ ZEND_METHOD(reflection_class, newInstanceWithoutConstructor) METHOD_NOTSTATIC(reflection_class_ptr); GET_REFLECTION_OBJECT_PTR(ce); - if (ce->create_object != NULL && ce->ce_flags & ZEND_ACC_FINAL_CLASS) { + if (ce->create_object != NULL && ce->ce_flags & ZEND_ACC_FINAL) { zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %s is an internal class marked as final that cannot be instantiated without invoking its constructor", ce->name->val); } @@ -6187,7 +6187,7 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */ REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_IMPLICIT_ABSTRACT", ZEND_ACC_IMPLICIT_ABSTRACT_CLASS); REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_EXPLICIT_ABSTRACT", ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); - REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_FINAL", ZEND_ACC_FINAL_CLASS); + REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_FINAL", ZEND_ACC_FINAL); INIT_CLASS_ENTRY(_reflection_entry, "ReflectionObject", reflection_object_functions); _reflection_entry.create_object = reflection_objects_new; |