Add fix for immutable strings.

This commit is contained in:
Richard W.M. Jones 2017-11-08 18:34:33 +00:00
parent 67ee8833b4
commit f816b4f5cb
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,17 @@
diff -ur ocaml-gettext-0.3.7.old/libgettext-ocaml/gettextMo_int32.ml ocaml-gettext-0.3.7/libgettext-ocaml/gettextMo_int32.ml
--- ocaml-gettext-0.3.7.old/libgettext-ocaml/gettextMo_int32.ml 2017-03-01 22:03:24.000000000 +0000
+++ ocaml-gettext-0.3.7/libgettext-ocaml/gettextMo_int32.ml 2017-11-08 18:33:04.486280040 +0000
@@ -104,11 +104,11 @@
(Int32.to_int length,Int32.to_int offset)
in
if 0 <= ioffset + ilength && ioffset + ilength < in_channel_length chn then
- let str = String.make ilength 'X'
+ let str = Bytes.make ilength 'X'
in
seek_in chn ioffset;
really_input chn str 0 ilength;
- str
+ Bytes.to_string str
else
(* We use this exception, because that what should happen if we try to
read the string *)

View File

@ -14,6 +14,8 @@ Patch0: ocaml-gettext-0.3.4-use-ocamlopt-g.patch
Patch0001: 0001-pr_gettext-stop-tracking-and-printing-untranslated-s.patch
Patch0002: 0002-pr_gettext-stop-printing-extracted-strings.patch
Patch0003: 0003-add-more-generated-files-to-.gitignore.patch
# Fix for immutable strings in OCaml 4.06.
Patch4: ocaml-gettext-0.3.7-bytes-fix.patch
BuildRequires: ocaml >= 4.00.1
BuildRequires: ocaml-findlib-devel >= 1.3.3-3
@ -207,6 +209,7 @@ chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
%changelog
* Wed Nov 08 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-2
- OCaml 4.06.0 rebuild.
- Add fix for immutable strings.
* Sat Sep 23 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-1
- Update to new upstream version 0.3.7.