Skip to content

Commit

Permalink
Patch the v0.14.1 opam release with a byte code fix.
Browse files Browse the repository at this point in the history
The masking function called for bytecode in bits_stubs.c calls the wrong
value conversion function, and basically breaks the bits api.

This patches it to call the correct function.

The native code was correct.

Signed-off-by: andrewray <evilkidder@gmail.com>
  • Loading branch information
andrewray committed Mar 24, 2021
1 parent 1d32837 commit 4164966
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bits_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ CAMLprim value hardcaml_bits_mask(intnat width, value vdst) {
}

CAMLprim value hardcaml_bits_mask_bc(value width, value vdst) {
return hardcaml_bits_mask(Val_int(width), vdst);
return hardcaml_bits_mask(Int_val(width), vdst);
}

/* Add two multiword [Bits.t]. The widths of the arguments and results are the same.
Expand Down

0 comments on commit 4164966

Please sign in to comment.