Mercurial > hg > openjdk > bsd-port > jdk
changeset 8834:48c4e54f7870 jdk7u161-b01
8035640: JNU_CHECK_EXCEPTION should support c++ JNI syntax
Reviewed-by: anthony, alanb
author | pchelko |
---|---|
date | Tue, 04 Mar 2014 13:03:37 +0400 |
parents | 14a055f3804c |
children | 2a7d0883d64a |
files | src/share/native/common/jni_util.h |
diffstat | 1 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/native/common/jni_util.h Mon Nov 27 05:43:28 2017 +0000 +++ b/src/share/native/common/jni_util.h Tue Mar 04 13:03:37 2014 +0400 @@ -304,6 +304,21 @@ } \ } while (0) \ +#ifdef __cplusplus +#define JNU_CHECK_EXCEPTION(env) \ + do { \ + if ((env)->ExceptionCheck()) { \ + return; \ + } \ + } while (0) \ + +#define JNU_CHECK_EXCEPTION_RETURN(env, y) \ + do { \ + if ((env)->ExceptionCheck()) { \ + return (y); \ + } \ + } while (0) +#else #define JNU_CHECK_EXCEPTION(env) \ do { \ if ((*env)->ExceptionCheck(env)) { \ @@ -317,7 +332,7 @@ return (y); \ } \ } while (0) - +#endif /* __cplusplus */ /************************************************************************ * Debugging utilities */