mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
[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
This commit is contained in:
parent
45770e01eb
commit
7fbfc910ee
@ -48,7 +48,8 @@ CAMLprim value cstr_to_string(const unsigned char *Str, unsigned Len) {
|
|||||||
CAMLparam0();
|
CAMLparam0();
|
||||||
CAMLlocal1(String);
|
CAMLlocal1(String);
|
||||||
if (Str) {
|
if (Str) {
|
||||||
String = caml_alloc_initialized_string(Len, Str);
|
String = caml_alloc_string(Len);
|
||||||
|
memcpy(String_val(Str), Str, Len);
|
||||||
} else {
|
} else {
|
||||||
String = caml_alloc_string(0);
|
String = caml_alloc_string(0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user