cvs: ZendEngine2 / zend_API.c zend_compile.c

From: Date: Sun, 19 Feb 2006 11:42:30 +0000
Subject: cvs: ZendEngine2 / zend_API.c zend_compile.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4590@lists.php.net to get a copy of this message
helly Sun Feb 19 11:42:30 2006 UTC Modified files: /ZendEngine2 zend_compile.c zend_API.c Log: - Static functions cannot be abstract http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_compile.c?r1=1.679&r2=1.680&diff_format=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.679 ZendEngine2/zend_compile.c:1.680 --- ZendEngine2/zend_compile.c:1.679 Sun Feb 5 23:26:55 2006 +++ ZendEngine2/zend_compile.c Sun Feb 19 11:42:30 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.679 2006/02/05 23:26:55 helly Exp $ */ +/* $Id: zend_compile.c,v 1.680 2006/02/19 11:42:30 helly Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -1108,6 +1108,9 @@ } else { fn_flags = 0; } + if ((fn_flags & ZEND_ACC_STATIC) && (fn_flags & ZEND_ACC_ABSTRACT)) { + zend_error(E_COMPILE_ERROR, "Static function %v%s%R() cannot be abstract", is_method ? CG(active_class_entry)->name : "", is_method ? "::" : "", Z_TYPE(function_name->u.constant), Z_UNIVAL(function_name->u.constant)); + } function_token->u.op_array = CG(active_op_array); lcname = zend_u_str_case_fold(Z_TYPE(function_name->u.constant), name, name_len, 0, &lcname_len); http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_API.c?r1=1.340&r2=1.341&diff_format=u Index: ZendEngine2/zend_API.c diff -u ZendEngine2/zend_API.c:1.340 ZendEngine2/zend_API.c:1.341 --- ZendEngine2/zend_API.c:1.340 Sun Feb 19 10:39:48 2006 +++ ZendEngine2/zend_API.c Sun Feb 19 11:42:30 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.c,v 1.340 2006/02/19 10:39:48 helly Exp $ */ +/* $Id: zend_API.c,v 1.341 2006/02/19 11:42:30 helly Exp $ */ #include "zend.h" #include "zend_execute.h" @@ -2081,6 +2081,9 @@ scope->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; } } + if (ptr->flags & ZEND_ACC_STATIC) { + zend_error(error_type, "Static function %s%s%s() cannot be abstract", scope ? scope->name : "", scope ? "::" : "", ptr->fname); + } } else { if (scope && (scope->ce_flags & ZEND_ACC_INTERFACE)) { efree(lc_class_name);

« previous php.zend-engine.cvs (#4590) next »