From a92492652c146c4c51a94922345ddf4c168cdcf4 Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Mon, 10 Oct 2016 17:10:48 +0200 Subject: [safe-string] Switch to buffer to `Bytes` --- toplevel/vernac.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toplevel/vernac.ml b/toplevel/vernac.ml index 0e72a044c1..c1a659c38d 100644 --- a/toplevel/vernac.ml +++ b/toplevel/vernac.ml @@ -105,7 +105,7 @@ let verbose_phrase verbch loc = match verbch with | Some ch -> let len = snd loc - fst loc in - let s = String.create len in + let s = Bytes.create len in seek_in ch (fst loc); really_input ch s 0 len; Feedback.msg_notice (str s) @@ -162,7 +162,7 @@ let pr_new_syntax po loc chan_beautify ocom = let pp_cmd_header loc com = let shorten s = try (String.sub s 0 30)^"..." with _ -> s in let noblank s = - for i = 0 to String.length s - 1 do + for i = 0 to Bytes.length s - 1 do match s.[i] with | ' ' | '\n' | '\t' | '\r' -> s.[i] <- '~' | _ -> () -- cgit v1.2.3