8000 Fixing issues with absolute read/writes on offset views by sh54 · Pull Request #4 · helins/binf.cljc · GitHub
[go: up one dir, main page]

Skip to content

Fixing issues with absolute read/writes on offset views - #4

Closed
sh54 wants to merge 1 commit into
helins:mainfrom
sh54:offset_views
Closed

sh54 wants to merge 1 commit into
helins:mainfrom
sh54:offset_views

Conversation

@sh54
@sh54 sh54 commented May 31, 2021
Copy link
Copy Markdown
Contributor

Fixes #3

This just makes the impl of binf.protocol/-IByteBuffer for ByteBuffer the same as the existing impl for DirectByteBuffer. I am not quite seeing what addition of the .arrayOffset was doing for things but I may well be missing something!

With this change I think many uses of (binf.protocol/-array-index this position) can just be replaced with position.

This was just occurring with the jvm ByteBuffer implementations.
@helins
helins commented Jun 2, 2021
Copy link
Copy Markdown
Owner

Indeed, you seem to be right. I believe this is an artifact that escaped tests. Some time ago, the position of a view with an offset was not 0 and it needed that kind of special support. It's merged on develop. I'll improve the tests and merge on main, thanks :)

@helins helins closed this Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Absolute read/write fails for offset views in java implementation

2 participants

0