summaryrefslogtreecommitdiff
path: root/system/yaml/fix-emitter-0.2.1.patch
diff options
context:
space:
mode:
authorzlg <zlg@zlg.space>2018-11-20 20:47:42 -0800
committerzlg <zlg@zlg.space>2018-11-20 20:54:33 -0800
commit78d40257bd969b58407a251d9746e8fcf0fe4879 (patch)
tree7e36bd1f80120f2043cf9357f0745ae7ececdae6 /system/yaml/fix-emitter-0.2.1.patch
parent75c78e3366d98013cc1d0f897db658243cceb6c5 (diff)
downloadpackages-78d40257bd969b58407a251d9746e8fcf0fe4879.tar.gz
packages-78d40257bd969b58407a251d9746e8fcf0fe4879.tar.bz2
packages-78d40257bd969b58407a251d9746e8fcf0fe4879.tar.xz
packages-78d40257bd969b58407a251d9746e8fcf0fe4879.zip
system/yaml: Backport emitter fix from v0.2.2-pre1
These patches fix an emitter problem that prevents PyYAML 3.13's test suite from passing. They should not be necessary when libyaml v0.2.2 is released. Patch-Author: James Clarke <jrtc27@jrtc27.com> See-Also: https://github.com/yaml/pyyaml/issues/184 See-Also: https://github.com/yaml/libyaml/issues/60#issuecomment-311836709
Diffstat (limited to 'system/yaml/fix-emitter-0.2.1.patch')
-rw-r--r--system/yaml/fix-emitter-0.2.1.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/system/yaml/fix-emitter-0.2.1.patch b/system/yaml/fix-emitter-0.2.1.patch
new file mode 100644
index 000000000..f3614e349
--- /dev/null
+++ b/system/yaml/fix-emitter-0.2.1.patch
@@ -0,0 +1,35 @@
+Contributor Note: This patch will be part of v0.2.2 which hasn't been
+formally released as of 2018-11-20. It should be removed once this
+package is version bumped.
+
+From e5ebb70a01cc0fbd9e519050d51d704f58c2a33d Mon Sep 17 00:00:00 2001
+From: James Clarke <jrtc27@jrtc27.com>
+Date: Thu, 29 Jun 2017 02:26:09 +0100
+Subject: [PATCH 2/2] Skip trailing document terminator at the end of the
+ stream
+
+---
+ src/emitter.c | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/src/emitter.c b/src/emitter.c
+index c593a7d..1502590 100644
+--- a/src/emitter.c
++++ b/src/emitter.c
+@@ -649,14 +649,6 @@ yaml_emitter_emit_document_start(yaml_emitter_t *emitter,
+
+ else if (event->type == YAML_STREAM_END_EVENT)
+ {
+- if (emitter->open_ended)
+- {
+- if (!yaml_emitter_write_indicator(emitter, "...", 1, 0, 0))
+- return 0;
+- if (!yaml_emitter_write_indent(emitter))
+- return 0;
+- }
+-
+ if (!yaml_emitter_flush(emitter))
+ return 0;
+
+--
+2.13.2