aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/unsafe
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/unsafe')
-rw-r--r--stdlib/source/unsafe/lux/data/binary.lux13
1 files changed, 7 insertions, 6 deletions
diff --git a/stdlib/source/unsafe/lux/data/binary.lux b/stdlib/source/unsafe/lux/data/binary.lux
index ffc2b5e84..91726c57a 100644
--- a/stdlib/source/unsafe/lux/data/binary.lux
+++ b/stdlib/source/unsafe/lux/data/binary.lux
@@ -271,7 +271,8 @@
(with_expansions [<reference> (: ..Binary reference')
<sample> (: ..Binary sample')
- <jvm> (java/util/Arrays::equals <reference> <sample>)]
+ <jvm> (java/util/Arrays::equals <reference> <sample>)
+ <jvm> (ffi.of_boolean <jvm>)]
(template: .public (= reference' sample')
[(for [@.old <jvm>
@.jvm <jvm>]
@@ -290,9 +291,9 @@
... TODO: Turn into a template ASAP.
(inline: .public (copy! bytes source_offset source target_offset target)
(-> Nat Nat ..Binary Nat ..Binary ..Binary)
- (with_expansions [<jvm> (java/lang/System::arraycopy source (.int source_offset)
- target (.int target_offset)
- (.int bytes))
+ (with_expansions [<jvm> (java/lang/System::arraycopy source (ffi.as_int (.int source_offset))
+ target (ffi.as_int (.int target_offset))
+ (ffi.as_int (.int bytes)))
<jvm> (exec
<jvm>
target)]
@@ -311,8 +312,8 @@
... TODO: Turn into a template ASAP.
(with_expansions [<jvm> (java/util/Arrays::copyOfRange binary
- (.int offset)
- (.int limit))
+ (ffi.as_int (.int offset))
+ (ffi.as_int (.int limit)))
<jvm> (let [limit ("lux i64 +" size offset)]
<jvm>)]
(inline: .public (slice offset size binary)