@@ -98,7 +98,6 @@ public BooleanPointer(long size) {
9898 public BooleanPointer () { }
9999 /** @see Pointer#Pointer(Pointer) */
100100 public BooleanPointer (Pointer p ) { super (p ); }
101- private native void allocateArray (long size );
102101
103102 /** @see Pointer#position(long) */
104103 @ Override public BooleanPointer position (long position ) {
@@ -119,7 +118,7 @@ public BooleanPointer() { }
119118 /** @return {@code get(0)} */
120119 public boolean get () { return get (0 ); }
121120 /** @return the i-th {@code boolean} value of a native array */
122- public native boolean get (long i );
121+ public boolean get (long i ) { return Raw . getInstance (). getByte ( address + i * sizeof ()) != 0 ; }
123122 /** @return {@code put(0, b)} */
124123 public BooleanPointer put (boolean b ) { return put (0 , b ); }
125124 /**
@@ -129,7 +128,10 @@ public BooleanPointer() { }
129128 * @param b the {@code boolean} value to copy
130129 * @return this
131130 */
132- public native BooleanPointer put (long i , boolean b );
131+ public BooleanPointer put (long i , boolean b ) {
132+ Raw .getInstance ().putByte (address + i * sizeof (), (byte ) (b ? 1 : 0 ));
133+ return this ;
134+ }
133135
134136 /** @return {@code get(array, 0, array.length)} */
135137 public BooleanPointer get (boolean [] array ) { return get (array , 0 , array .length ); }
0 commit comments