diff options
| author | Marcus Boerger <helly@php.net> | 2003-08-30 11:33:41 +0000 | 
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2003-08-30 11:33:41 +0000 | 
| commit | ad31a021bc9e6b83243adabd6a0c5c52bcc6c9d8 (patch) | |
| tree | 7b1c1833520d0b208bb8244e8cdc9958e3c35134 | |
| parent | 49ff8e78662f7616a3e881e9cd25d53357196642 (diff) | |
| download | php-git-ad31a021bc9e6b83243adabd6a0c5c52bcc6c9d8.tar.gz | |
Make those final (see comment)
| -rw-r--r-- | Zend/zend_default_classes.c | 14 | ||||
| -rw-r--r-- | Zend/zend_exceptions.c | 14 | 
2 files changed, 18 insertions, 10 deletions
diff --git a/Zend/zend_default_classes.c b/Zend/zend_default_classes.c index 2e2ebaee96..5c51ca1420 100644 --- a/Zend/zend_default_classes.c +++ b/Zend/zend_default_classes.c @@ -122,13 +122,17 @@ ZEND_METHOD(exception, gettrace)  	_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}  }; diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 2e2ebaee96..5c51ca1420 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -122,13 +122,17 @@ ZEND_METHOD(exception, gettrace)  	_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}  };  | 
