[OCaml] Fix buildbot failure in OCaml tests
authorVaivaswatha Nagaraj <vaivaswatha@zilliqa.com>
Wed, 17 Mar 2021 05:55:43 +0000 (11:25 +0530)
committerVaivaswatha Nagaraj <vaivaswatha@zilliqa.com>
Wed, 17 Mar 2021 05:59:55 +0000 (11:29 +0530)
commitf7be9db6220cb39f0eaa12d2af3abedf0d86c303
tree4908edc11ab668bd82c123162fed184f5f60aa8f
parenta1705336329af4ca39ac51534e33d9a2c3000881
[OCaml] Fix buildbot failure in OCaml tests

The commit 506df1bbfd16233134a6ddea96ed2d49077840fd introduced
a call to `caml_alloc_initialized_string` which seems to be
unavailable on older OCaml versions. So I'm now switching to
using `caml_alloc_string` and using a `memcpy` after that, as
is done in the rest of the file.

Buildbot failure:
https://lab.llvm.org/buildbot/#/builders/16/builds/7919
llvm/bindings/ocaml/llvm/llvm_ocaml.c