cvs: ZendEngine2 / zend_API.c zend_API.h
| From: | Marcus Boerger | Date: | Fri, 24 Feb 2006 13:29:54 +0000 |
| Subject: | cvs: ZendEngine2 / zend_API.c zend_API.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-4620@lists.php.net to get a copy of this message | ||
helly Fri Feb 24 13:29:54 2006 UTC
Modified files:
/ZendEngine2 zend_API.c zend_API.h
Log:
- Add macros to mark functions/alias functions as deprecated
(mentioned by Sara and obviously neccessary)
- Fix function/method flag error detection logic
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_API.c?r1=1.347&r2=1.348&diff_format=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.347 ZendEngine2/zend_API.c:1.348
--- ZendEngine2/zend_API.c:1.347 Wed Feb 22 12:02:44 2006
+++ ZendEngine2/zend_API.c Fri Feb 24 13:29:54 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c,v 1.347 2006/02/22 12:02:44 dmitry Exp $ */
+/* $Id: zend_API.c,v 1.348 2006/02/24 13:29:54 helly Exp $ */
#include "zend.h"
#include "zend_execute.h"
@@ -2060,7 +2060,9 @@
}
if (ptr->flags) {
if (!(ptr->flags & ZEND_ACC_PPP_MASK)) {
- zend_error(error_type, "Invalid access level for %s%s%s() - access must be exactly one of
public, protected or private", scope ? scope->name.s : "", scope ? "::"
: "", ptr->fname);
+ if (ptr->flags != ZEND_ACC_DEPRECATED || scope) {
+ zend_error(error_type, "Invalid access level for %s%s%s() - access must be exactly one of
public, protected or private", scope ? scope->name.s : "", scope ? "::"
: "", ptr->fname);
+ }
internal_function->fn_flags = ZEND_ACC_PUBLIC | ptr->flags;
} else {
internal_function->fn_flags = ptr->flags;
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_API.h?r1=1.234&r2=1.235&diff_format=u
Index: ZendEngine2/zend_API.h
diff -u ZendEngine2/zend_API.h:1.234 ZendEngine2/zend_API.h:1.235
--- ZendEngine2/zend_API.h:1.234 Wed Feb 22 11:37:11 2006
+++ ZendEngine2/zend_API.h Fri Feb 24 13:29:54 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.h,v 1.234 2006/02/22 11:37:11 dmitry Exp $ */
+/* $Id: zend_API.h,v 1.235 2006/02/24 13:29:54 helly Exp $ */
#ifndef ZEND_API_H
#define ZEND_API_H
@@ -50,7 +50,9 @@
#define ZEND_NAMED_FE(zend_name, name, arg_info) ZEND_FENTRY(zend_name, name, arg_info, 0)
#define ZEND_FE(name, arg_info) ZEND_FENTRY(name, ZEND_FN(name), arg_info, 0)
+#define ZEND_DEP_FE(name, arg_info) ZEND_FENTRY(name, ZEND_FN(name), arg_info,
ZEND_ACC_DEPRECATED)
#define ZEND_FALIAS(name, alias, arg_info) ZEND_FENTRY(name, ZEND_FN(alias), arg_info, 0)
+#define ZEND_DEP_FALIAS(name, alias, arg_info) ZEND_FENTRY(name, ZEND_FN(alias), arg_info,
ZEND_ACC_DEPRECATED)
#define ZEND_ME(classname, name, arg_info, flags) ZEND_FENTRY(name, ZEND_FN(classname##_##name),
arg_info, flags)
#define ZEND_ABSTRACT_ME(classname, name, arg_info) ZEND_FENTRY(name, NULL, arg_info,
ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT)
#define ZEND_MALIAS(classname, name, alias, arg_info, flags) \