8035640: JNU_CHECK_EXCEPTION should support c++ JNI syntax
Reviewed-by: anthony, alanb
This commit is contained in:
parent
da7601aeec
commit
0390c16ac8
@ -297,6 +297,21 @@ JNU_NotifyAll(JNIEnv *env, jobject object);
|
||||
} \
|
||||
} 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)) { \
|
||||
@ -310,7 +325,7 @@ JNU_NotifyAll(JNIEnv *env, jobject object);
|
||||
return (y); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#endif /* __cplusplus */
|
||||
/************************************************************************
|
||||
* Debugging utilities
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user