We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following:
(let [view (-> (binf.buffer/alloc 64) (binf/view 32 16) (binf/endian-set :little-endian))] (binf/wa-b8 view 0 42) (t/is (= 42 (binf/ra-u8 view 0))))
Works in clojurescript but fails in clojure with the exception:
Unhandled java.lang.IndexOutOfBoundsException 32 HeapByteBuffer.java: 171 java.nio.HeapByteBuffer/get impl.clj: 89 helins.binf.protocol.impl/eval17986/fn protocol.cljc: 24 helins.binf.protocol$eval11976$fn__12035$G__11961__12042/invoke binf.cljc: 69 helins.binf$ra_u8/invokeStatic binf.cljc: 63 helins.binf$ra_u8/invoke REPL: 66 helins.binf.test/eval18113
(extend-type ByteBuffer binf.protocol/-IByteBuffer (-array-index [this position] position))
This is the same the existing implementation for DirectByteBuffer.
DirectByteBuffer
The text was updated successfully, but these errors were encountered:
Latest commit on main has fixed this (not yet released) if you fancy giving it a go.
I rewrote the tests using test.check so hopefully there won't be anymore edge cases. But I'll wait a bit before cutting a release.
test.check
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
The following:
Works in clojurescript but fails in clojure with the exception:
Fix:
This is the same the existing implementation for
DirectByteBuffer
.The text was updated successfully, but these errors were encountered: