qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1522557 - /qpid/proton/trunk/proton-c/bindings/java/java.i
Date Thu, 12 Sep 2013 13:08:16 GMT
Author: rhs
Date: Thu Sep 12 13:08:15 2013
New Revision: 1522557

URL: http://svn.apache.org/r1522557
Log:
fixed bad cast

Modified:
    qpid/proton/trunk/proton-c/bindings/java/java.i

Modified: qpid/proton/trunk/proton-c/bindings/java/java.i
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/java/java.i?rev=1522557&r1=1522556&r2=1522557&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/java/java.i (original)
+++ qpid/proton/trunk/proton-c/bindings/java/java.i Thu Sep 12 13:08:15 2013
@@ -123,8 +123,8 @@ JAVA_ARRAYS_TYPEMAPS(char, byte, jbyte, 
   jmethodID remainingId= JCALL3(GetMethodID,jenv, bbclass, "remaining", "()I");
   isDirect = JCALL2(CallBooleanMethod,jenv, $input, isDirectId);
   jint position = JCALL2(CallIntMethod,jenv, $input, positionId);
-  jint size = (JCALL2(CallIntMethod,jenv, $input, remainingId));
-  $2 = (size_t*)&size; // todo what if length of size_t is not the same as jint
+  size_t size = (JCALL2(CallIntMethod,jenv, $input, remainingId));
+  $2 = &size;
 
   if(isDirect) {
     $1 =  (char*)JCALL1(GetDirectBufferAddress,jenv, $input) + position;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message