Re: [PATCH] tools/ocaml/mmap: Drop the len parameter from Xenmmap.write

2023-03-29 Thread Christian Lindig
> On 24 Mar 2023, at 20:25, Andrew Cooper wrote: > > Strings in Ocaml carry their own length. Absolutely nothing good can come > from having caml_string_length(data) be different to len. > > Use the appropriate accessor, String_val(), but retain the workaround for the > Ocaml -safe-string

[PATCH] tools/ocaml/mmap: Drop the len parameter from Xenmmap.write

2023-03-24 Thread Andrew Cooper
Strings in Ocaml carry their own length. Absolutely nothing good can come from having caml_string_length(data) be different to len. Use the appropriate accessor, String_val(), but retain the workaround for the Ocaml -safe-string constness bug in the same way as we've done elsewhere in Xen.