Skip to content

Use Number for reading and writing, fixes #25 #35

New issue

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

Merged
merged 1 commit into from
Jun 30, 2019
Merged

Conversation

hdgarrood
Copy link
Member

Int is not suitable for many of the options for BufferValueType, since
both UInt32 types as well as all of the floating point types are
inhabited by values which are not representable as Int.

This is quite a big breaking change unfortunately, but the library is
basically broken for about half of the BufferValueType constructors
right now, and this seems to me to be the most sensible way of fixing
it.

Note that {to,from}Array are unchanged because they deal with arrays of
octets.

Fixes #25

Int is not suitable for many of the options for BufferValueType, since
both UInt32 types as well as all of the floating point types are
inhabited by values which are not representable as Int.

This is quite a big breaking change unfortunately, but the library is
basically broken for about half of the BufferValueType constructors
right now, and this seems to me to be the most sensible way of fixing
it.

Note that {to,from}Array are unchanged because they deal with arrays of
octets.
@hdgarrood hdgarrood merged commit dac7d47 into master Jun 30, 2019
@hdgarrood hdgarrood deleted the number-read-write branch June 30, 2019 12:12
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.

Use Number instead of Int for read
1 participant