cvs: ZendEngine2 / zend_default_classes.c
| From: | Marcus Boerger | Date: | Sat, 30 Aug 2003 11:33:41 +0000 |
| Subject: | cvs: ZendEngine2 / zend_default_classes.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-1740@lists.php.net to get a copy of this message | ||
helly Sat Aug 30 07:33:41 2003 EDT
Modified files:
/ZendEngine2 zend_default_classes.c
Log:
Make those final (see comment)
Index: ZendEngine2/zend_default_classes.c
diff -u ZendEngine2/zend_default_classes.c:1.20 ZendEngine2/zend_default_classes.c:1.21
--- ZendEngine2/zend_default_classes.c:1.20 Thu Aug 28 20:16:00 2003
+++ ZendEngine2/zend_default_classes.c Sat Aug 30 07:33:41 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_default_classes.c,v 1.20 2003/08/29 00:16:00 helly Exp $ */
+/* $Id: zend_default_classes.c,v 1.21 2003/08/30 11:33:41 helly Exp $ */
#include "zend.h"
#include "zend_API.h"
@@ -122,13 +122,17 @@
_default_exception_get_entry(getThis(), "trace", sizeof("trace")-1,
return_value TSRMLS_CC);
}
+/* All functions that may be used in uncaught exception handlers must be final
+ * and must not throw exceptions. Otherwise we would need a facility to handle
+ * such exceptions in that handler.
+ */
static zend_function_entry default_exception_functions[] = {
ZEND_ME(exception, __construct, NULL, 0)
- ZEND_ME(exception, getmessage, NULL, 0)
- ZEND_ME(exception, getcode, NULL, 0)
- ZEND_ME(exception, getfile, NULL, 0)
- ZEND_ME(exception, getline, NULL, 0)
- ZEND_ME(exception, gettrace, NULL, 0)
+ ZEND_ME(exception, getmessage, NULL, 0) /* non final for now */
+ ZEND_ME(exception, getcode, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
+ ZEND_ME(exception, getfile, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
+ ZEND_ME(exception, getline, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
+ ZEND_ME(exception, gettrace, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
{NULL, NULL, NULL}
};