You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2008/06/27 23:00:35 UTC

svn commit: r672392 - /harmony/enhanced/classlib/trunk/modules/nio/src/main/native/nio/shared/DirectBufferUtil.c

Author: hindessm
Date: Fri Jun 27 14:00:35 2008
New Revision: 672392

URL: http://svn.apache.org/viewvc?rev=672392&view=rev
Log:
Fix more 32-bit pointer to/from 64-bit integer casting warnings.

Modified:
    harmony/enhanced/classlib/trunk/modules/nio/src/main/native/nio/shared/DirectBufferUtil.c

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/native/nio/shared/DirectBufferUtil.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/native/nio/shared/DirectBufferUtil.c?rev=672392&r1=672391&r2=672392&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/native/nio/shared/DirectBufferUtil.c (original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/native/nio/shared/DirectBufferUtil.c Fri Jun 27 14:00:35 2008
@@ -15,6 +15,7 @@
  */
 
 #include <jni.h>
+#include "hycomp.h"
 
 JNIEXPORT jobject JNICALL NewDirectByteBuffer(JNIEnv * , void*, jlong );
 JNIEXPORT void* JNICALL GetDirectBufferAddress(JNIEnv * , jobject );
@@ -49,7 +50,7 @@
 	  if (!onMethod){
 	      	  return NULL;
 	  }
-	  platformaddress = (*env)->CallStaticObjectMethod(env, platformaddressClass, onMethod, (jlong)address);
+	  platformaddress = (*env)->CallStaticObjectMethod(env, platformaddressClass, onMethod, (jlong)(IDATA)address);
 	  return (*env)->NewObject(env, directBufferClass, newBufferMethod, 
                                 platformaddress, (jint)capacity, (jint)0);
   }
@@ -89,7 +90,7 @@
 	  if (!toLongMethod){
 	      	  return 0;
 	  }
-	  return (void*)(*env)->CallLongMethod(env, platformAddr, toLongMethod);	  
+	  return (void*)(IDATA)(*env)->CallLongMethod(env, platformAddr, toLongMethod);	  
   }
 
 /*