You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/04/24 11:37:45 UTC

svn commit: r768238 - in /commons/sandbox/runtime/trunk/src/main: java/org/apache/commons/runtime/DirectByteBuffer.java native/shared/dbb.c

Author: mturk
Date: Fri Apr 24 09:37:44 2009
New Revision: 768238

URL: http://svn.apache.org/viewvc?rev=768238&view=rev
Log:
Use int for array offsets

Modified:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DirectByteBuffer.java
    commons/sandbox/runtime/trunk/src/main/native/shared/dbb.c

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DirectByteBuffer.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DirectByteBuffer.java?rev=768238&r1=768237&r2=768238&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DirectByteBuffer.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DirectByteBuffer.java Fri Apr 24 09:37:44 2009
@@ -45,11 +45,11 @@
     private static native ByteBuffer    alloc1(long size)
         throws OutOfMemoryError, IllegalArgumentException;
 
-    private static native ByteBuffer[]  alloc2(long[] sizes, long off, int len)
+    private static native ByteBuffer[]  alloc2(long[] sizes, int off, int len)
         throws OutOfMemoryError, IllegalArgumentException,
         IndexOutOfBoundsException;
 
-    private static native ByteBuffer[]  alloc3(long[] sizes, long off, int len)
+    private static native ByteBuffer[]  alloc3(long[] sizes, int off, int len)
         throws OutOfMemoryError, IllegalArgumentException,
         IndexOutOfBoundsException;
 
@@ -129,7 +129,7 @@
      * @throws IndexOutOfBoundsException if copying would cause access of
      *         data outside array bounds.
      */
-    public static ByteBuffer[] allocate(long sizes[], long off, int len)
+    public static ByteBuffer[] allocate(long sizes[], int off, int len)
         throws NullPointerException, IllegalArgumentException,
         IndexOutOfBoundsException
     {
@@ -187,7 +187,7 @@
      * @throws IndexOutOfBoundsException if copying would cause access of
      *         data outside array bounds.
      */
-    public static ByteBuffer[] allocateAndClear(long sizes[], long off, int len)
+    public static ByteBuffer[] allocateAndClear(long sizes[], int off, int len)
         throws NullPointerException, IllegalArgumentException,
         IndexOutOfBoundsException
     {
@@ -222,7 +222,7 @@
     public static ByteBuffer[] allocateAndClear(long sizes[])
         throws NullPointerException, IllegalArgumentException
     {
-        return alloc3(sizes, 0L, sizes.length);
+        return alloc3(sizes, 0, sizes.length);
     }
 
     /**

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/dbb.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/dbb.c?rev=768238&r1=768237&r2=768238&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/dbb.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/dbb.c Fri Apr 24 09:37:44 2009
@@ -82,7 +82,7 @@
 
 ACR_JNI_EXPORT_DECLARE(jobject, DirectByteBuffer, alloc2)(ACR_JNISTDARGS,
                                                           jlongArray sizes,
-                                                          jlong off, jint len)
+                                                          jint off, jint len)
 {
     jint   i;
     jlong *ia;
@@ -163,7 +163,7 @@
 
 ACR_JNI_EXPORT_DECLARE(jobject, DirectByteBuffer, alloc3)(ACR_JNISTDARGS,
                                                           jlongArray sizes,
-                                                          jlong off, jint len)
+                                                          jint off, jint len)
 {
     jint   i;
     jlong *ia;