1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
From: Stephane Glondu <steph@glondu.net>
Date: Wed, 14 Aug 2019 10:58:46 +0200
Subject: Fix compilation with -safe-string
---
setup.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/setup.ml b/setup.ml
index 387ae0e..025b420 100644
--- a/setup.ml
+++ b/setup.ml
@@ -227,11 +227,11 @@ module OASISString = struct
raise Not_found
let replace_chars f s =
- let buf = String.make (String.length s) 'X' in
+ let buf = Bytes.make (String.length s) 'X' in
for i = 0 to String.length s - 1 do
buf.[i] <- f s.[i]
done;
- buf
+ Bytes.to_string buf
end
|