Skip to content

Commit

Permalink
Merge pull request #55 from MisterDA/remove-compatibility.h
Browse files Browse the repository at this point in the history
Use modern bigarray functions (5.00 compatibility)
  • Loading branch information
djs55 authored Jan 24, 2022
2 parents 788afcb + a8896bc commit 24b4ce8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions sha1_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ CAMLprim value stub_sha1_update_bigarray(value ctx, value buf)
{
CAMLparam2(ctx, buf);
struct sha1_ctx ctx_dup;
unsigned char *data = Data_bigarray_val(buf);
size_t len = Bigarray_val(buf)->dim[0];
unsigned char *data = Caml_ba_data_val(buf);
size_t len = Caml_ba_array_val(buf)->dim[0];

ctx_dup = *GET_CTX_STRUCT(ctx);
caml_release_runtime_system();
Expand Down
4 changes: 2 additions & 2 deletions sha256_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ CAMLprim value stub_sha256_update_bigarray(value ctx, value buf)
{
CAMLparam2(ctx, buf);
struct sha256_ctx ctx_dup;
unsigned char *data = Data_bigarray_val(buf);
size_t len = Bigarray_val(buf)->dim[0];
unsigned char *data = Caml_ba_data_val(buf);
size_t len = Caml_ba_array_val(buf)->dim[0];

ctx_dup = *GET_CTX_STRUCT(ctx);
caml_release_runtime_system();
Expand Down
4 changes: 2 additions & 2 deletions sha512_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ CAMLprim value stub_sha512_update_bigarray(value ctx, value buf)
{
CAMLparam2(ctx, buf);
struct sha512_ctx ctx_dup;
unsigned char *data = Data_bigarray_val(buf);
size_t len = Bigarray_val(buf)->dim[0];
unsigned char *data = Caml_ba_data_val(buf);
size_t len = Caml_ba_array_val(buf)->dim[0];

ctx_dup = *GET_CTX_STRUCT(ctx);
caml_release_runtime_system();
Expand Down

0 comments on commit 24b4ce8

Please sign in to comment.