cvs: ZendEngine2 / zend_API.c zend_compile.c zend_execute.c
| From: | Marcus Boerger | Date: | Fri, 27 Feb 2004 09:14:56 +0000 |
| Subject: | cvs: ZendEngine2 / zend_API.c zend_compile.c zend_execute.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2414@lists.php.net to get a copy of this message | ||
helly Fri Feb 27 04:14:56 2004 EDT
Modified files:
/ZendEngine2 zend_API.c zend_compile.c zend_execute.c
Log:
Fixes for abstract classes/methods
http://cvs.php.net/diff.php/ZendEngine2/zend_API.c?r1=1.242&r2=1.243&ty=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.242 ZendEngine2/zend_API.c:1.243
--- ZendEngine2/zend_API.c:1.242 Wed Feb 25 09:56:45 2004
+++ ZendEngine2/zend_API.c Fri Feb 27 04:14:55 2004
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c,v 1.242 2004/02/25 14:56:45 zeev Exp $ */
+/* $Id: zend_API.c,v 1.243 2004/02/27 09:14:55 helly Exp $ */
#include "zend.h"
#include "zend_execute.h"
@@ -1245,12 +1245,15 @@
} else {
internal_function->fn_flags = ZEND_ACC_PUBLIC;
}
- if (ptr->flags&ZEND_ACC_ABSTRACT) {
+ if (ptr->flags & ZEND_ACC_ABSTRACT) {
if (scope) {
- scope->ce_flags |= ZEND_ACC_ABSTRACT_CLASS;
+ scope->ce_flags |= ZEND_ACC_ABSTRACT;
+ if (!(scope->ce_flags & ZEND_ACC_INTERFACE)) {
+ scope->ce_flags |= ZEND_ACC_ABSTRACT_CLASS;
+ }
}
} else {
- if (scope && scope->ce_flags&ZEND_ACC_INTERFACE) {
+ if (scope && (scope->ce_flags & ZEND_ACC_INTERFACE)) {
zend_error(error_type, "Interface %s cannot contain non abstract method %s()",
scope->name, ptr->fname);
return FAILURE;
}
http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.547&r2=1.548&ty=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.547 ZendEngine2/zend_compile.c:1.548
--- ZendEngine2/zend_compile.c:1.547 Wed Feb 25 12:23:50 2004
+++ ZendEngine2/zend_compile.c Fri Feb 27 04:14:55 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.547 2004/02/25 17:23:50 zeev Exp $ */
+/* $Id: zend_compile.c,v 1.548 2004/02/27 09:14:55 helly Exp $ */
#include "zend_language_parser.h"
#include "zend.h"
@@ -2563,7 +2563,10 @@
if (!(ce->ce_flags & ZEND_ACC_INTERFACE)
&& !(ce->ce_flags & ZEND_ACC_ABSTRACT_CLASS)
&& ((parent_token->op_type != IS_UNUSED) || (ce->num_interfaces > 0))) {
- do_verify_abstract_class(TSRMLS_C);
+ zend_verify_abstract_class(ce TSRMLS_CC);
+ if (ce->parent || ce->num_interfaces) {
+ do_verify_abstract_class(TSRMLS_C);
+ }
}
CG(active_class_entry) = NULL;
}
http://cvs.php.net/diff.php/ZendEngine2/zend_execute.c?r1=1.615&r2=1.616&ty=u
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.615 ZendEngine2/zend_execute.c:1.616
--- ZendEngine2/zend_execute.c:1.615 Wed Feb 25 12:23:50 2004
+++ ZendEngine2/zend_execute.c Fri Feb 27 04:14:55 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.c,v 1.615 2004/02/25 17:23:50 zeev Exp $ */
+/* $Id: zend_execute.c,v 1.616 2004/02/27 09:14:55 helly Exp $ */
#define ZEND_INTENSIVE_DEBUGGING 0
@@ -3167,7 +3167,7 @@
int zend_new_handler(ZEND_OPCODE_HANDLER_ARGS)
{
- if (EX_T(opline->op1.u.var).class_entry->ce_flags &
(ZEND_ACC_INTERFACE|ZEND_ACC_ABSTRACT_CLASS)) {
+ if (EX_T(opline->op1.u.var).class_entry->ce_flags &
(ZEND_ACC_INTERFACE|ZEND_ACC_ABSTRACT|ZEND_ACC_ABSTRACT_CLASS)) {
char *class_type;
if (EX_T(opline->op1.u.var).class_entry->ce_flags & ZEND_ACC_INTERFACE) {