fix ocamllex -ml, works with -safe-string option (#750)

master
Hongbo Zhang 2016-08-26 03:11:55 -04:00 committed by Alain Frisch
parent 722e6e93fc
commit bda66837a5
2 changed files with 5 additions and 2 deletions

View File

@ -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)

View File

@ -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\