Skip to content

Commit

Permalink
Use modern bigarray functions
Browse files Browse the repository at this point in the history
Introduced in 3.10. Old aliases removed in 5.00.
  • Loading branch information
MisterDA committed Jan 12, 2022
1 parent 788afcb commit a8896bc
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 a8896bc

Please sign in to comment.