From c22ed40261c53dabe5a4876d6afca8ff5e5f58ca Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 22 Aug 2018 16:35:19 +0300 Subject: [PATCH] Fix bytes module Signed-off-by: Rudi Grinberg --- src/stdune/bytes.ml | 6 ++++-- src/stdune/bytes.mli | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/stdune/bytes.ml b/src/stdune/bytes.ml index 75ca6c91..c4d07798 100644 --- a/src/stdune/bytes.ml +++ b/src/stdune/bytes.ml @@ -1,7 +1,9 @@ (* [blit_string] was forgotten from the labeled version in OCaml 4.02—4.04. *) -[@@@ocaml.warning "-32"] +include StdLabels.Bytes + let blit_string ~src ~src_pos ~dst ~dst_pos ~len = Caml.Bytes.blit_string src src_pos dst dst_pos len -include StdLabels.Bytes +let sub_string dst ~pos ~len = + Caml.Bytes.sub_string dst pos len diff --git a/src/stdune/bytes.mli b/src/stdune/bytes.mli index a395a7ee..aa19112d 100644 --- a/src/stdune/bytes.mli +++ b/src/stdune/bytes.mli @@ -7,3 +7,9 @@ val blit_string -> dst_pos:int -> len:int -> unit + +val sub_string + : t + -> pos:int + -> len:int + -> string