diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2002-06-05 05:27:09 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2002-06-05 05:27:09 +0000 |
commit | aba0ab119ee7756937601a41b316ca01bc3b3cd3 (patch) | |
tree | 18ef82b8339065a4db1e45c47da6eb5fd228f6d2 | |
parent | 35a61a7652c3314b50b17690034ec8c1dd298af7 (diff) |
String.length lb.lex_buffer <> lb.lex_buffer_len
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4877 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | camlp4/top/camlp4_top.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/camlp4/top/camlp4_top.ml b/camlp4/top/camlp4_top.ml index 7906edaab..414838bbf 100644 --- a/camlp4/top/camlp4_top.ml +++ b/camlp4/top/camlp4_top.ml @@ -23,7 +23,7 @@ value highlight_locations lb loc1 loc2 = if pos0 < 0 then raise Exit else (); let pos_at_bol = ref 0 in print_string "Toplevel input:\n# "; - for pos = 0 to String.length lb.lex_buffer - pos0 - 1 do { + for pos = 0 to lb.lex_buffer_len - pos0 - 1 do { let c = lb.lex_buffer.[pos + pos0] in if c = '\n' then do { if pos_at_bol.val <= fst loc1 && snd loc1 <= pos then do { @@ -45,7 +45,7 @@ value highlight_locations lb loc1 loc2 = } else print_char '\n'; pos_at_bol.val := pos + 1; - if pos < String.length lb.lex_buffer - pos0 - 1 then + if pos < lb.lex_buffer_len - pos0 - 1 then print_string " " else () } |