on master help sign in
Fix wrong result type for idris_peek in Java
9054e62Jan Bessai
java/src/main/java/org/idris/rts/ForeignPrimitives.java+2−2
@@ -209,9 +209,9 @@ public class ForeignPrimitives {
209 buf = null;
209 buf = null;
210 }
210 }
211
211
212− public static Integer idris_peek(Object buf, int offset) {
212+ public static byte idris_peek(Object buf, int offset) {
213 ByteBuffer buffer = (ByteBuffer)buf;
213 ByteBuffer buffer = (ByteBuffer)buf;
214− return Integer.valueOf(buffer.get(offset));
214+ return buffer.get(offset);
215 }
215 }
216
216
217 public static void idris_poke(Object buf, int offset, Object data) {
217 public static void idris_poke(Object buf, int offset, Object data) {