aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/ltac
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-02-23 13:36:52 +0100
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-03-14 22:19:26 +0100
commitfa895511eaa1c374c72ea2096c1dfb33dfbee379 (patch)
tree9a552159563e577deac1a0673093f1c7279d58e4 /plugins/ltac
parent3757311c70020448bc8c834b129a7305df82bcd9 (diff)
[safe-string] ltac/profile_ltac
No functional change, one extra copy introduced but it seems hard to avoid.
Diffstat (limited to 'plugins/ltac')
-rw-r--r--plugins/ltac/profile_ltac.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/ltac/profile_ltac.ml b/plugins/ltac/profile_ltac.ml
index 2514ededb..58123f63e 100644
--- a/plugins/ltac/profile_ltac.ml
+++ b/plugins/ltac/profile_ltac.ml
@@ -257,7 +257,7 @@ let string_of_call ck =
(Pptactic.pr_glob_tactic (Global.env ())
te)
) in
- for i = 0 to String.length s - 1 do if s.[i] = '\n' then s.[i] <- ' ' done;
+ let s = String.map (fun c -> if c = '\n' then ' ' else c) s in
let s = try String.sub s 0 (CString.string_index_from s 0 "(*") with Not_found -> s in
CString.strip s