< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/refignore/refignore.cpp

Print this page
rev 51722 : 8210700: Clean up JNI_ENV_ARG and factorize the macros for vmTestbase/jvmti/unit tests
Summary:
Reviewed-by:

@@ -27,25 +27,12 @@
 #include "jvmti.h"
 #include "jni_tools.h"
 #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
 
 static jvmtiEnv *jvmti = NULL;

@@ -271,12 +258,11 @@
 
   if (options != NULL && strcmp(options, "printdump") == 0) {
     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;
   }
 

@@ -483,8 +469,6 @@
   }
 
   return result;
 }
 
-#ifdef __cplusplus
 }
-#endif
< prev index next >