com php-src: Remove the ZEND_ACC_CLONE flag: Zend/zen d_API.c Zend/zend_compile.c Zend/zend_compile.h Zend/zend_inheritance.c

[email protected] (Nikita Popov)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    b6a4aad82049c680ac5c224f675b5ffd44c642e5
Author:    Nikita Popov <[email protected]>         Sat, 22 Apr 2017 15:44:24 +0200
Parents:   6ae40ca0e2e719cc6b904dd38d5802750b5c27b6
Branches:  master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=b6a4aad82049c680ac5c224f675b5ffd44c642e5

Log:
Remove the ZEND_ACC_CLONE flag

This one is completely unused

Changed paths:
  M  Zend/zend_API.c
  M  Zend/zend_compile.c
  M  Zend/zend_compile.h
  M  Zend/zend_inheritance.c


Diff:
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 926868d..0274a28 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2381,7 +2381,6 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
 			dtor->common.fn_flags &= ~ZEND_ACC_ALLOW_STATIC;
 		}
 		if (clone) {
-			clone->common.fn_flags |= ZEND_ACC_CLONE;
 			if (clone->common.fn_flags & ZEND_ACC_STATIC) {
 				zend_error(error_type, "Constructor %s::%s() cannot be static", ZSTR_VAL(scope->name), ZSTR_VAL(clone->common.function_name));
 			}
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 09fd99e..35b15b3 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -6146,7 +6146,6 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */
 		}
 	}
 	if (ce->clone) {
-		ce->clone->common.fn_flags |= ZEND_ACC_CLONE;
 		if (ce->clone->common.fn_flags & ZEND_ACC_STATIC) {
 			zend_error_noreturn(E_COMPILE_ERROR, "Clone method %s::%s() cannot be static",
 				ZSTR_VAL(ce->name), ZSTR_VAL(ce->clone->common.function_name));
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index 742a102..370a57a 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -205,6 +205,7 @@ typedef struct _zend_oparray_context {
  * Free flags:
  * 0x10
  * 0x20
+ * 0x8000
  * 0x2000000
  */
 
@@ -227,7 +228,6 @@ typedef struct _zend_oparray_context {
 /* method flags (special method detection) */
 #define ZEND_ACC_CTOR		0x2000
 #define ZEND_ACC_DTOR		0x4000
-#define ZEND_ACC_CLONE		0x8000
 
 /* method flag used by Closure::__invoke() */
 #define ZEND_ACC_USER_ARG_INFO 0x80
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index 5b5c975..71b3eb0 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -1103,7 +1103,7 @@ static zend_bool zend_traits_method_compatibility_check(zend_function *fn, zend_
 static void zend_add_magic_methods(zend_class_entry* ce, zend_string* mname, zend_function* fe) /* {{{ */
 {
 	if (zend_string_equals_literal(mname, ZEND_CLONE_FUNC_NAME)) {
-		ce->clone = fe; fe->common.fn_flags |= ZEND_ACC_CLONE;
+		ce->clone = fe;
 	} else if (zend_string_equals_literal(mname, ZEND_CONSTRUCTOR_FUNC_NAME)) {
 		if (ce->constructor && (!ce->parent || ce->constructor != ce->parent->constructor)) {
 			zend_error_noreturn(E_COMPILE_ERROR, "%s has colliding constructor definitions coming from traits", ZSTR_VAL(ce->name));
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.