[jffi-next] 36/49: Add putArray() for boolean and char arrays

Tim Potter tpot-guest at moszumanska.debian.org
Wed Mar 4 04:51:14 UTC 2015


This is an automated email from the git hooks/post-receive script.

tpot-guest pushed a commit to annotated tag upstream/1.0.10
in repository jffi-next.

commit 8d87c8d3fea3d08e2bf1b54c230240cd58be64aa
Author: Wayne Meissner <wmeissner at gmail.com>
Date:   Tue Apr 26 19:30:07 2011 +1000

    Add putArray() for boolean and char arrays
---
 src/com/kenai/jffi/ObjectBuffer.java | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/src/com/kenai/jffi/ObjectBuffer.java b/src/com/kenai/jffi/ObjectBuffer.java
index fb46ac3..feffc16 100644
--- a/src/com/kenai/jffi/ObjectBuffer.java
+++ b/src/com/kenai/jffi/ObjectBuffer.java
@@ -237,6 +237,30 @@ final class ObjectBuffer {
     public void putArray(int index, double[] array, int offset, int length, int flags) {
         putObject(array, offset, length, makeObjectFlags(flags, DOUBLE | ARRAY, index));
     }
+    
+    /**
+     * Adds a java boolean array as a pointer parameter.
+     *
+     * @param array The java array to use as the pointer parameter.
+     * @param offset The offset from the start of the array.
+     * @param length The length of the array to use.
+     * @param flags The flags to use (IN, OUT)
+     */
+    public void putArray(int index, boolean[] array, int offset, int length, int flags) {
+        putObject(array, offset, length, makeObjectFlags(flags, BOOLEAN | ARRAY, index));
+    }
+    
+    /**
+     * Adds a java char array as a pointer parameter.
+     *
+     * @param array The java array to use as the pointer parameter.
+     * @param offset The offset from the start of the array.
+     * @param length The length of the array to use.
+     * @param flags The flags to use (IN, OUT)
+     */
+    public void putArray(int index, char[] array, int offset, int length, int flags) {
+        putObject(array, offset, length, makeObjectFlags(flags, CHAR | ARRAY, index));
+    }
 
     /**
      * Adds a java direct buffer as a pointer parameter.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jffi-next.git



More information about the pkg-java-commits mailing list