Skip to content
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

Fix uint24 conversions to other int types #39

Merged
merged 1 commit into from
Feb 5, 2020

Conversation

rixed
Copy link
Contributor

@rixed rixed commented Feb 4, 2020

before:

  # Uint32.to_int (Uint24.(to_uint32 (of_int 42)));;
  - : int = 85

after:

  # Uint32.to_int (Uint24.(to_uint32 (of_int 42)));;
  - : int = 42

Closes #38

before:

  # Uint32.to_int (Uint24.(to_uint32 (of_int 42)));;
  - : int = 85

after:

  # Uint32.to_int (Uint24.(to_uint32 (of_int 42)));;
  - : int = 42

Closes andrenth#38
@rgrinberg rgrinberg merged commit 5c396fd into andrenth:master Feb 5, 2020
@rixed rixed deleted the fix-38 branch February 10, 2020 20:40
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Oct 28, 2020
CHANGES:

## Fixes:

* Correct conversion from uint24 to other ints (andrenth/ocaml-stdint#39, @rixed)
* Fix conversion from all ints to uint24 and int24 (andrenth/ocaml-stdint#41, @rixed)
* Fix int24 failing to recover from casts (andrenth/ocaml-stdint#43, @rixed)
* Fix sign extensions (andrenth/ocaml-stdint#49, @rixed)
* `Long_val` returns `intnat`, previously `long` was used (andrenth/ocaml-stdint#53, @dra27)
* Reduce size of marshalled custom values on 4.08+ (andrenth/ocaml-stdint#54, @dra27)
* Store 128-bit ints as structs to prevent unaligned access (andrenth/ocaml-stdint#55, @dra27)

## New features:

* Add `of_substring` (andrenth/ocaml-stdint#49, @darlentar)
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Oct 28, 2020
CHANGES:

## Fixes:

* Correct conversion from uint24 to other ints (andrenth/ocaml-stdint#39, @rixed)
* Fix conversion from all ints to uint24 and int24 (andrenth/ocaml-stdint#41, @rixed)
* Fix int24 failing to recover from casts (andrenth/ocaml-stdint#43, @rixed)
* Fix sign extensions (andrenth/ocaml-stdint#49, @rixed)
* `Long_val` returns `intnat`, previously `long` was used (andrenth/ocaml-stdint#53, @dra27)
* Reduce size of marshalled custom values on 4.08+ (andrenth/ocaml-stdint#54, @dra27)
* Store 128-bit ints as structs to prevent unaligned access (andrenth/ocaml-stdint#55, @dra27)

## New features:

* Add `of_substring` (andrenth/ocaml-stdint#49, @darlentar)
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.

Erroneous conversion from u24 to u32
2 participants