Skip to content
Snippets Groups Projects
Commit 10ee1104 authored by Andre Maroneze's avatar Andre Maroneze
Browse files

Merge branch 'feature/michele/725' into 'master'

[sanitizer] Update to OCaml 4.05 (use of Buffer.truncate).

Closes #725

See merge request frama-c/frama-c!2513
parents 01cafd27 412eac65
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,7 @@ let add_sep buffer =
else
begin
buffer.state <- TRUNCATE ;
(* TODO [OCaml 4.05] Buffer.truncate buffer.content buffer.lastsep ; *)
Buffer.truncate buffer.content buffer.lastsep
end
let add_char buffer = function
......@@ -92,8 +92,4 @@ let rec add_list buffer = function
| p::ps -> add_string buffer p ; add_sep buffer ; add_list buffer ps
let contents buffer =
(* TODO [OCaml 4.05] simply buffer contents if using Buffer.truncate *)
let s = Buffer.contents buffer.content in
if buffer.state = TRUNCATE then
String.sub s 0 buffer.lastsep
else s
Buffer.contents buffer.content
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment