diff options
| author | Hongbo Zhang <bobzhang1988@gmail.com> | 2016-08-26 03:11:55 -0400 |
|---|---|---|
| committer | Alain Frisch <alain@frisch.fr> | 2016-08-26 09:11:55 +0200 |
| commit | bda66837a59ef30c3b2ff2513879e5762e5bec06 (patch) | |
| tree | f660824868c7a9a8a201125ce14de52289e50097 /lex | |
| parent | 722e6e93fc01a91a47fec25ac39f80d687f4e023 (diff) | |
| download | ocaml-bda66837a59ef30c3b2ff2513879e5762e5bec06.tar.gz | |
fix ocamllex -ml, works with -safe-string option (#750)
Diffstat (limited to 'lex')
| -rw-r--r-- | lex/outputbis.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lex/outputbis.ml b/lex/outputbis.ml index 6de3103a9c..fc8dfac886 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\ |
