harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r666843 - /harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/inst_agt.c
Date Wed, 11 Jun 2008 21:08:56 GMT
Author: hindessm
Date: Wed Jun 11 14:08:56 2008
New Revision: 666843

URL: http://svn.apache.org/viewvc?rev=666843&view=rev
Log:
Here we override the err (jint/jni) error variable with an identically
named jvmtiError variable which is then used for a jni error code.  This
seems confusing so let's make the jvmtiError variable have a different
name.

Modified:
    harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/inst_agt.c

Modified: harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/inst_agt.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/inst_agt.c?rev=666843&r1=666842&r2=666843&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/inst_agt.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/inst_agt.c
Wed Jun 11 14:08:56 2008
@@ -370,7 +370,7 @@
 	
 	if(!gdata){		
 		jvmtiCapabilities capabilities;		
-		jvmtiError err;
+		jvmtiError jvmti_err;
 		jvmtiEventCallbacks callbacks;
 		JNIEnv *env = NULL;
 		static jvmtiEnv *jvmti;
@@ -390,19 +390,20 @@
 		capabilities.can_redefine_classes = 1;
 		//FIXME VM doesnot support the capbility right now.
 		//capabilities.can_redefine_any_class = 1;
-		err = (*jvmti)->AddCapabilities(jvmti, &capabilities);
-		check_jvmti_error(env, err, "Cannot add JVMTI capabilities.");
+		jvmti_err = (*jvmti)->AddCapabilities(jvmti, &capabilities);
+		check_jvmti_error(env, jvmti_err,
+                                  "Cannot add JVMTI capabilities.");
 
 		//set events callback function
 		(void)memset(&callbacks, 0, sizeof(callbacks));
 		callbacks.ClassFileLoadHook = &callbackClassFileLoadHook;
 		callbacks.VMInit = &callbackVMInit;
-		err = (*jvmti)->SetEventCallbacks(jvmti, &callbacks, sizeof(jvmtiEventCallbacks));
-		check_jvmti_error(env, err, "Cannot set JVMTI event callback functions.");
+		jvmti_err = (*jvmti)->SetEventCallbacks(jvmti, &callbacks, sizeof(jvmtiEventCallbacks));
+		check_jvmti_error(env, jvmti_err, "Cannot set JVMTI event callback functions.");
 
 		//enable classfileloadhook event
-		err = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_INIT, NULL);
-		check_jvmti_error(env, err, "Cannot set JVMTI VMInit event notification mode.");
+		jvmti_err = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_INIT,
NULL);
+		check_jvmti_error(env, jvmti_err, "Cannot set JVMTI VMInit event notification mode.");
 	}		
 	
 	return Parse_Options(vm,jnienv, gdata->jvmti,options);	



Mime
View raw message