diff --git a/Changes b/Changes index 994958d4a..93348d97a 100644 --- a/Changes +++ b/Changes @@ -166,6 +166,9 @@ OCaml 4.04.0: ### Tools: +- MPR#7323: ocamllex -ml work with (-safe-string) + (Hongbo Zhang) + - MPR#7189: toplevel #show, follow chains of module aliases (Gabriel Scherer, report by Daniel Bünzli, review by Thomas Refis) diff --git a/lex/outputbis.ml b/lex/outputbis.ml index 6de3103a9..fc8dfac88 100644 --- a/lex/outputbis.ml +++ b/lex/outputbis.ml @@ -44,7 +44,7 @@ let output_auto_defs oc has_refill = \n end\ \n end else begin\ \n let i = lexbuf.Lexing.lex_curr_pos in\ -\n let c = lexbuf.Lexing.lex_buffer.[i] in\ +\n let c = Bytes.get lexbuf.Lexing.lex_buffer i in\ \n lexbuf.Lexing.lex_curr_pos <- i+1 ;\ \n state lexbuf k (Char.code c)\ \n end\ @@ -61,7 +61,7 @@ let output_auto_defs oc has_refill = \n end\ \n end else begin\ \n let i = lexbuf.Lexing.lex_curr_pos in\ -\n let c = lexbuf.Lexing.lex_buffer.[i] in\ +\n let c = Bytes.get lexbuf.Lexing.lex_buffer i in\ \n lexbuf.Lexing.lex_curr_pos <- i+1 ;\ \n Char.code c\ \n end\