summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorGuilherme Blanco <guilhermeblanco@hotmail.com>2014-11-22 04:57:55 +0000
committerJulien Pauli <jpauli@php.net>2014-12-12 17:29:54 +0100
commit094d409b3d34c51f49e0121e5ccfe8b2a717aaf6 (patch)
treedb03022fa8f4eda77977af84c45bcc0eb33d9fa0 /ext
parent5ad01e1d33fc669608f09cc55e0db373b89a7546 (diff)
downloadphp-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')
-rw-r--r--ext/mysqli/mysqli.c4
-rw-r--r--ext/pdo/pdo_stmt.c2
-rwxr-xr-xext/phar/phar_object.c4
-rw-r--r--ext/reflection/php_reflection.c10
-rw-r--r--ext/reflection/tests/ReflectionClass_getModifiers_basic.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_modifiers_001.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_toString_001.phpt2
-rw-r--r--ext/tidy/tidy.c2
8 files changed, 14 insertions, 14 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 878c8fb946..6d7210fe59 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -625,7 +625,7 @@ PHP_MINIT_FUNCTION(mysqli)
zend_declare_property_null(ce, "embedded", sizeof("embedded") - 1, ZEND_ACC_PUBLIC TSRMLS_CC);
zend_declare_property_null(ce, "reconnect", sizeof("reconnect") - 1, ZEND_ACC_PUBLIC TSRMLS_CC);
zend_declare_property_null(ce, "report_mode", sizeof("report_mode") - 1, ZEND_ACC_PUBLIC TSRMLS_CC);
- ce->ce_flags |= ZEND_ACC_FINAL_CLASS;
+ ce->ce_flags |= ZEND_ACC_FINAL;
zend_hash_add_ptr(&classes, ce->name, &mysqli_driver_properties);
REGISTER_MYSQLI_CLASS_ENTRY("mysqli", mysqli_link_class_entry, mysqli_link_methods);
@@ -655,7 +655,7 @@ PHP_MINIT_FUNCTION(mysqli)
REGISTER_MYSQLI_CLASS_ENTRY("mysqli_warning", mysqli_warning_class_entry, mysqli_warning_methods);
ce = mysqli_warning_class_entry;
- ce->ce_flags |= ZEND_ACC_FINAL_CLASS | ZEND_ACC_PROTECTED;
+ ce->ce_flags |= ZEND_ACC_FINAL;
zend_hash_init(&mysqli_warning_properties, 0, NULL, free_prop_handler, 1);
MYSQLI_ADD_PROPERTIES(&mysqli_warning_properties, mysqli_warning_property_entries);
zend_declare_property_null(ce, "message", sizeof("message") - 1, ZEND_ACC_PUBLIC TSRMLS_CC);
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index 27cc157ed7..1491c80cfd 100644
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -2292,7 +2292,7 @@ void pdo_stmt_init(TSRMLS_D)
INIT_CLASS_ENTRY(ce, "PDORow", pdo_row_functions);
pdo_row_ce = zend_register_internal_class(&ce TSRMLS_CC);
- pdo_row_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; /* when removing this a lot of handlers need to be redone */
+ pdo_row_ce->ce_flags |= ZEND_ACC_FINAL; /* when removing this a lot of handlers need to be redone */
pdo_row_ce->create_object = pdo_row_new;
pdo_row_ce->serialize = pdo_row_serialize;
}
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index f82b825631..d23c7cd6c6 100755
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -5308,11 +5308,11 @@ void phar_object_init(TSRMLS_D) /* {{{ */
#else
INIT_CLASS_ENTRY(ce, "Phar", php_archive_methods);
phar_ce_archive = zend_register_internal_class(&ce TSRMLS_CC);
- phar_ce_archive->ce_flags |= ZEND_ACC_FINAL_CLASS;
+ phar_ce_archive->ce_flags |= ZEND_ACC_FINAL;
INIT_CLASS_ENTRY(ce, "PharData", php_archive_methods);
phar_ce_data = zend_register_internal_class(&ce TSRMLS_CC);
- phar_ce_data->ce_flags |= ZEND_ACC_FINAL_CLASS;
+ phar_ce_data->ce_flags |= ZEND_ACC_FINAL;
#endif
REGISTER_PHAR_CLASS_CONST_LONG(phar_ce_archive, "BZ2", PHAR_ENT_COMPRESSED_BZ2)
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;
diff --git a/ext/reflection/tests/ReflectionClass_getModifiers_basic.phpt b/ext/reflection/tests/ReflectionClass_getModifiers_basic.phpt
index 65f23c935f..8d2bd47d12 100644
--- a/ext/reflection/tests/ReflectionClass_getModifiers_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_getModifiers_basic.phpt
@@ -30,7 +30,7 @@ dump_modifiers('g');
--EXPECT--
int(0)
int(32)
-int(64)
+int(4)
int(128)
int(524288)
int(524416)
diff --git a/ext/reflection/tests/ReflectionClass_modifiers_001.phpt b/ext/reflection/tests/ReflectionClass_modifiers_001.phpt
index 941bfe5f2b..1e0a97dfe0 100644
--- a/ext/reflection/tests/ReflectionClass_modifiers_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_modifiers_001.phpt
@@ -37,7 +37,7 @@ int(0)
bool(true)
bool(false)
bool(false)
-int(64)
+int(4)
bool(false)
bool(true)
bool(false)
diff --git a/ext/reflection/tests/ReflectionClass_toString_001.phpt b/ext/reflection/tests/ReflectionClass_toString_001.phpt
index 8dd571c3a9..c47aba8b8d 100644
--- a/ext/reflection/tests/ReflectionClass_toString_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_toString_001.phpt
@@ -14,7 +14,7 @@ Class [ <internal:Reflection> class ReflectionClass implements Reflector ] {
- Constants [3] {
Constant [ integer IS_IMPLICIT_ABSTRACT ] { 16 }
Constant [ integer IS_EXPLICIT_ABSTRACT ] { 32 }
- Constant [ integer IS_FINAL ] { 64 }
+ Constant [ integer IS_FINAL ] { 4 }
}
- Static properties [0] {
diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c
index 8ca27d7b9a..23531e9ae3 100644
--- a/ext/tidy/tidy.c
+++ b/ext/tidy/tidy.c
@@ -1037,7 +1037,7 @@ static PHP_MINIT_FUNCTION(tidy)
REGISTER_INI_ENTRIES();
REGISTER_TIDY_CLASS(tidy, doc, NULL, 0);
- REGISTER_TIDY_CLASS(tidyNode, node, NULL, ZEND_ACC_FINAL_CLASS);
+ REGISTER_TIDY_CLASS(tidyNode, node, NULL, ZEND_ACC_FINAL);
tidy_object_handlers_doc.cast_object = tidy_doc_cast_handler;
tidy_object_handlers_node.cast_object = tidy_node_cast_handler;