Fix safe-string.

This commit is contained in:
Richard W.M. Jones 2017-11-22 16:00:23 +00:00
parent 9b280269b7
commit ee0f50c7ba
2 changed files with 40 additions and 3 deletions

View File

@ -0,0 +1,30 @@
From 84ffcbebb71293e419154b0093cfc81f64e885fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20B=C3=BCnzli?= <daniel.buenzli@erratique.ch>
Date: Wed, 15 Mar 2017 23:37:03 +0100
Subject: [PATCH] Safe-string support.
(cherry picked from commit 0e29ed18ce6617a45de478cde07db4c1625c5a64)
---
_tags | 2 +-
opam | 2 +-
src/xmlm.ml | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/xmlm.ml b/src/xmlm.ml
index 1bb8bbc..c97501a 100644
--- a/src/xmlm.ml
+++ b/src/xmlm.ml
@@ -960,8 +960,8 @@ struct
let make_output ?(decl = true) ?(nl = false) ?(indent = None)
?(ns_prefix = fun _ ->None) d =
- let outs, outc = match d with
- | `Channel c -> (output c), (output_char c)
+ let outs, outc = match d with
+ | `Channel c -> (output_substring c), (output_char c)
| `Buffer b -> (Std_buffer.add_substring b), (Std_buffer.add_char b)
| `Fun f ->
let os s p l =
--
2.13.1

View File

@ -11,12 +11,17 @@ Summary: A streaming XML codec
License: BSD
URL: http://erratique.ch/software/xmlm
Source0: http://erratique.ch/software/xmlm/releases/xmlm-%{version}.tbz
# Ensure source files are included in generated debuginfo subpackage
Patch0: xmlm-1.2.0-debug.patch
# Example XML files for testing
Source1: test-valid.xml
Source2: test-invalid.xml
# Ensure source files are included in generated debuginfo subpackage
Patch0: xmlm-1.2.0-debug.patch
# Safe-string, cherry-picked from upstream.
Patch1: 0001-Safe-string-support.patch
BuildRequires: ocaml >= 3.10.0
BuildRequires: ocaml-findlib
BuildRequires: ocaml-ocamlbuild
@ -41,6 +46,7 @@ developing applications that use %{name}.
%prep
%setup -q -n %{libname}-%{version}
%patch0 -p1 -b .debug
%patch1 -p1
%build
@ -104,8 +110,9 @@ grep expected invalid-err.log >/dev/null
%changelog
* Sat Nov 18 2017 Richard W.M. Jones <rjones@redhat.com> - 1.2.0-25
* Wed Nov 22 2017 Richard W.M. Jones <rjones@redhat.com> - 1.2.0-25
- OCaml 4.06.0 rebuild.
- Fix safe-string for OCaml 4.06.
* Wed Aug 09 2017 Richard W.M. Jones <rjones@redhat.com> - 1.2.0-24
- OCaml 4.05.0 rebuild.