test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/GetLocalVariable/getlocal003/getlocal003.cpp
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/GetLocalVariable/getlocal003/getlocal003.cpp Mon Sep 17 19:36:09 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/GetLocalVariable/getlocal003/getlocal003.cpp Mon Sep 17 19:48:35 2018 -0700
@@ -31,21 +31,8 @@
#include "agent_common.h"
#include "JVMTITools.h"
-#ifdef __cplusplus
extern "C" {
-#endif
-
-#ifndef JNI_ENV_ARG
-#ifdef __cplusplus
-#define JNI_ENV_ARG(x, y) y
-#define JNI_ENV_PTR(x) x
-#else
-#define JNI_ENV_ARG(x,y) x, y
-#define JNI_ENV_PTR(x) (*x)
-#endif
-
-#endif
#define PASSED 0
#define STATUS_FAILED 2
@@ -151,8 +138,7 @@
printdump = JNI_TRUE;
}
- res = JNI_ENV_PTR(jvm)->GetEnv(JNI_ENV_ARG(jvm, (void **) &jvmti),
- JVMTI_VERSION_1_1);
+ res = jvm->GetEnv((void **) &jvmti, JVMTI_VERSION_1_1);
if (res != JNI_OK || jvmti == NULL) {
printf("Wrong result of a valid call to GetEnv!\n");
return JNI_ERR;
@@ -209,8 +195,7 @@
if (!caps.can_access_local_variables ||
!caps.can_generate_method_exit_events) return;
- mid = JNI_ENV_PTR(env)->GetStaticMethodID(JNI_ENV_ARG(env, cls),
- "staticMeth", "(I)I");
+ mid = env->GetStaticMethodID(cls, "staticMeth", "(I)I");
if (mid == NULL) {
printf("Cannot find Method ID for staticMeth\n");
result = STATUS_FAILED;
@@ -250,8 +235,7 @@
return;
}
- mid = JNI_ENV_PTR(env)->GetStaticMethodID(JNI_ENV_ARG(env, cls),
- "staticMeth", "(I)I");
+ mid = env->GetStaticMethodID(cls, "staticMeth", "(I)I");
if (mid == NULL) {
printf("Cannot find Method ID for staticMeth\n");
result = STATUS_FAILED;
@@ -324,6 +308,4 @@
return result;
}
-#ifdef __cplusplus
}
-#endif