Hello community,
here is the log from the commit of package perl-YAML-LibYAML-API for
openSUSE:Factory checked in at 2020-05-20 18:45:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-YAML-LibYAML-API (Old)
and /work/SRC/openSUSE:Factory/.perl-YAML-LibYAML-API.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-YAML-LibYAML-API"
Wed May 20 18:45:46 2020 rev:3 rq:807424 version:0.009
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-YAML-LibYAML-API/perl-YAML-LibYAML-API.changes
2020-02-20 14:59:52.914818027 +0100
+++
/work/SRC/openSUSE:Factory/.perl-YAML-LibYAML-API.new.2738/perl-YAML-LibYAML-API.changes
2020-05-20 18:46:19.913399534 +0200
@@ -1,0 +2,14 @@
+Sun May 17 03:14:36 UTC 2020 - Tina Müller <[email protected]>
+
+updated to 0.009
+ see /usr/share/doc/packages/perl-YAML-LibYAML-API/Changes
+
+ 0.009 2020-05-16 15:28:05+02:00
+
+ - Support emitting version directives
+ - Update libyaml sources to 0.2.4. Changes affecting this module:
+ - Output '...' at the stream end after a block scalar with trailing
empty lines
+ - Accept '%YAML 1.2' directives
+
+
+-------------------------------------------------------------------
Old:
----
YAML-LibYAML-API-0.008.tar.gz
New:
----
YAML-LibYAML-API-0.009.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-YAML-LibYAML-API.spec ++++++
--- /var/tmp/diff_new_pack.Rch3Pv/_old 2020-05-20 18:46:20.581401035 +0200
+++ /var/tmp/diff_new_pack.Rch3Pv/_new 2020-05-20 18:46:20.585401043 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-YAML-LibYAML-API
#
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
Name: perl-YAML-LibYAML-API
-Version: 0.008
+Version: 0.009
Release: 0
%define cpan_name YAML-LibYAML-API
Summary: Wrapper around the C libyaml library
License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
-Url: https://metacpan.org/release/%{cpan_name}
+URL: https://metacpan.org/release/%{cpan_name}
Source0:
https://cpan.metacpan.org/authors/id/T/TI/TINITA/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ YAML-LibYAML-API-0.008.tar.gz -> YAML-LibYAML-API-0.009.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/Changes
new/YAML-LibYAML-API-0.009/Changes
--- old/YAML-LibYAML-API-0.008/Changes 2020-02-19 13:56:45.000000000 +0100
+++ new/YAML-LibYAML-API-0.009/Changes 2020-05-16 15:30:52.000000000 +0200
@@ -1,5 +1,12 @@
Revision history for Perl module YAML::LibYAML::API
+0.009 2020-05-16 15:28:05+02:00
+
+ - Support emitting version directives
+ - Update libyaml sources to 0.2.4. Changes affecting this module:
+ - Output '...' at the stream end after a block scalar with trailing empty
lines
+ - Accept '%YAML 1.2' directives
+
0.008 2020-02-19 13:55:40+01:00
- Support numeric anchors (before strings were required)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/LibYAML/api.c
new/YAML-LibYAML-API-0.009/LibYAML/api.c
--- old/YAML-LibYAML-API-0.008/LibYAML/api.c 2020-02-19 13:56:45.000000000
+0100
+++ new/YAML-LibYAML-API-0.009/LibYAML/api.c 2020-05-16 15:30:52.000000000
+0200
@@ -623,10 +623,10 @@
*/
static int
-yaml_check_utf8(yaml_char_t *start, size_t length)
+yaml_check_utf8(const yaml_char_t *start, size_t length)
{
- yaml_char_t *end = start+length;
- yaml_char_t *pointer = start;
+ const yaml_char_t *end = start+length;
+ const yaml_char_t *pointer = start;
while (pointer < end) {
unsigned char octet;
@@ -794,7 +794,7 @@
*/
YAML_DECLARE(int)
-yaml_alias_event_initialize(yaml_event_t *event, yaml_char_t *anchor)
+yaml_alias_event_initialize(yaml_event_t *event, const yaml_char_t *anchor)
{
yaml_mark_t mark = { 0, 0, 0 };
yaml_char_t *anchor_copy = NULL;
@@ -819,8 +819,8 @@
YAML_DECLARE(int)
yaml_scalar_event_initialize(yaml_event_t *event,
- yaml_char_t *anchor, yaml_char_t *tag,
- yaml_char_t *value, int length,
+ const yaml_char_t *anchor, const yaml_char_t *tag,
+ const yaml_char_t *value, int length,
int plain_implicit, int quoted_implicit,
yaml_scalar_style_t style)
{
@@ -873,7 +873,7 @@
YAML_DECLARE(int)
yaml_sequence_start_event_initialize(yaml_event_t *event,
- yaml_char_t *anchor, yaml_char_t *tag, int implicit,
+ const yaml_char_t *anchor, const yaml_char_t *tag, int implicit,
yaml_sequence_style_t style)
{
yaml_mark_t mark = { 0, 0, 0 };
@@ -928,7 +928,7 @@
YAML_DECLARE(int)
yaml_mapping_start_event_initialize(yaml_event_t *event,
- yaml_char_t *anchor, yaml_char_t *tag, int implicit,
+ const yaml_char_t *anchor, const yaml_char_t *tag, int implicit,
yaml_mapping_style_t style)
{
yaml_mark_t mark = { 0, 0, 0 };
@@ -1193,7 +1193,7 @@
YAML_DECLARE(int)
yaml_document_add_scalar(yaml_document_t *document,
- yaml_char_t *tag, yaml_char_t *value, int length,
+ const yaml_char_t *tag, const yaml_char_t *value, int length,
yaml_scalar_style_t style)
{
struct {
@@ -1243,7 +1243,7 @@
YAML_DECLARE(int)
yaml_document_add_sequence(yaml_document_t *document,
- yaml_char_t *tag, yaml_sequence_style_t style)
+ const yaml_char_t *tag, yaml_sequence_style_t style)
{
struct {
yaml_error_type_t error;
@@ -1288,7 +1288,7 @@
YAML_DECLARE(int)
yaml_document_add_mapping(yaml_document_t *document,
- yaml_char_t *tag, yaml_mapping_style_t style)
+ const yaml_char_t *tag, yaml_mapping_style_t style)
{
struct {
yaml_error_type_t error;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/LibYAML/config.h
new/YAML-LibYAML-API-0.009/LibYAML/config.h
--- old/YAML-LibYAML-API-0.008/LibYAML/config.h 2020-02-19 13:56:45.000000000
+0100
+++ new/YAML-LibYAML-API-0.009/LibYAML/config.h 2020-05-16 15:30:52.000000000
+0200
@@ -44,7 +44,7 @@
#define PACKAGE_NAME "yaml"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "yaml 0.2.2"
+#define PACKAGE_STRING "yaml 0.2.4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "yaml"
@@ -53,13 +53,13 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "0.2.2"
+#define PACKAGE_VERSION "0.2.4"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
-#define YAML_VERSION "0.2.2"
+#define YAML_VERSION "0.2.4"
/* Define the major version number. */
#define YAML_VERSION_MAJOR 0
@@ -68,10 +68,10 @@
#define YAML_VERSION_MINOR 2
/* Define the patch version number. */
-#define YAML_VERSION_PATCH 2
+#define YAML_VERSION_PATCH 4
/* Define the version string. */
-#define YAML_VERSION_STRING "0.2.2"
+#define YAML_VERSION_STRING "0.2.4"
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/LibYAML/emitter.c
new/YAML-LibYAML-API-0.009/LibYAML/emitter.c
--- old/YAML-LibYAML-API-0.008/LibYAML/emitter.c 2020-02-19
13:56:45.000000000 +0100
+++ new/YAML-LibYAML-API-0.009/LibYAML/emitter.c 2020-05-16
15:30:52.000000000 +0200
@@ -495,6 +495,7 @@
yaml_emitter_emit_stream_start(yaml_emitter_t *emitter,
yaml_event_t *event)
{
+ emitter->open_ended = 0;
if (event->type == YAML_STREAM_START_EVENT)
{
if (!emitter->encoding) {
@@ -597,13 +598,20 @@
if (!yaml_emitter_write_indent(emitter))
return 0;
}
+ emitter->open_ended = 0;
if (event->data.document_start.version_directive) {
implicit = 0;
if (!yaml_emitter_write_indicator(emitter, "%YAML", 1, 0, 0))
return 0;
- if (!yaml_emitter_write_indicator(emitter, "1.1", 1, 0, 0))
- return 0;
+ if (event->data.document_start.version_directive->minor == 1) {
+ if (!yaml_emitter_write_indicator(emitter, "1.1", 1, 0, 0))
+ return 0;
+ }
+ else {
+ if (!yaml_emitter_write_indicator(emitter, "1.2", 1, 0, 0))
+ return 0;
+ }
if (!yaml_emitter_write_indent(emitter))
return 0;
}
@@ -644,12 +652,25 @@
emitter->state = YAML_EMIT_DOCUMENT_CONTENT_STATE;
+ emitter->open_ended = 0;
return 1;
}
else if (event->type == YAML_STREAM_END_EVENT)
{
+ /**
+ * This can happen if a block scalar with trailing empty lines
+ * is at the end of the stream
+ */
+ if (emitter->open_ended == 2)
+ {
+ if (!yaml_emitter_write_indicator(emitter, "...", 1, 0, 0))
+ return 0;
+ emitter->open_ended = 0;
+ if (!yaml_emitter_write_indent(emitter))
+ return 0;
+ }
if (!yaml_emitter_flush(emitter))
return 0;
@@ -691,9 +712,12 @@
if (!event->data.document_end.implicit) {
if (!yaml_emitter_write_indicator(emitter, "...", 1, 0, 0))
return 0;
+ emitter->open_ended = 0;
if (!yaml_emitter_write_indent(emitter))
return 0;
}
+ else if (!emitter->open_ended)
+ emitter->open_ended = 1;
if (!yaml_emitter_flush(emitter))
return 0;
@@ -1227,7 +1251,7 @@
}
/*
- * Write an achor.
+ * Write an anchor.
*/
static int
@@ -1326,7 +1350,10 @@
yaml_emitter_analyze_version_directive(yaml_emitter_t *emitter,
yaml_version_directive_t version_directive)
{
- if (version_directive.major != 1 || version_directive.minor != 1) {
+ if (version_directive.major != 1 || (
+ version_directive.minor != 1
+ && version_directive.minor != 2
+ )) {
return yaml_emitter_set_emitter_error(emitter,
"incompatible %YAML directive");
}
@@ -1796,7 +1823,6 @@
emitter->whitespace = is_whitespace;
emitter->indention = (emitter->indention && is_indention);
- emitter->open_ended = 0;
return 1;
}
@@ -1939,10 +1965,6 @@
emitter->whitespace = 0;
emitter->indention = 0;
- if (emitter->root_context)
- {
- emitter->open_ended = 1;
- }
return 1;
}
@@ -2203,7 +2225,7 @@
else if (string.start == string.pointer)
{
chomp_hint = "+";
- emitter->open_ended = 1;
+ emitter->open_ended = 2;
}
else
{
@@ -2213,7 +2235,7 @@
if (IS_BREAK(string))
{
chomp_hint = "+";
- emitter->open_ended = 1;
+ emitter->open_ended = 2;
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/LibYAML/etc/perl_libyaml.c
new/YAML-LibYAML-API-0.009/LibYAML/etc/perl_libyaml.c
--- old/YAML-LibYAML-API-0.008/LibYAML/etc/perl_libyaml.c 2020-02-19
13:56:45.000000000 +0100
+++ new/YAML-LibYAML-API-0.009/LibYAML/etc/perl_libyaml.c 2020-05-16
15:30:52.000000000 +0200
@@ -300,7 +300,6 @@
style = SvIV(*val);
}
- // fprintf(stderr, "event %d %s style=%d, tag=%s\n", i, type, style,
tag_name);
if (strEQ(type, "stream_start_event")) {
ok = yaml_stream_start_event_initialize(&event, 0);
}
@@ -314,11 +313,11 @@
perl_version_directive = (HV *)SvRV(*val);
val = hv_fetch(perl_version_directive, "major", 5, TRUE);
- if (val && SvOK(*val) && SvIOK( *val )) {
+ if (val && SvOK(*val) && (SvIOK( *val ) || SvPOK( *val )) ) {
major = SvIV(*val);
}
val = hv_fetch(perl_version_directive, "minor", 5, TRUE);
- if (val && SvOK(*val) && SvIOK( *val )) {
+ if (val && SvOK(*val) && (SvIOK( *val ) || SvPOK( *val )) ) {
minor = SvIV(*val);
}
if (major && minor) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/YAML-LibYAML-API-0.008/LibYAML/lib/YAML/LibYAML/API/XS.pm
new/YAML-LibYAML-API-0.009/LibYAML/lib/YAML/LibYAML/API/XS.pm
--- old/YAML-LibYAML-API-0.008/LibYAML/lib/YAML/LibYAML/API/XS.pm
2020-02-19 13:56:45.000000000 +0100
+++ new/YAML-LibYAML-API-0.009/LibYAML/lib/YAML/LibYAML/API/XS.pm
2020-05-16 15:30:52.000000000 +0200
@@ -2,7 +2,7 @@
use strict;
use warnings;
-our $VERSION = '0.008'; # VERSION
+our $VERSION = '0.009'; # VERSION
use XSLoader;
XSLoader::load('YAML::LibYAML::API::XS', $VERSION);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/LibYAML/loader.c
new/YAML-LibYAML-API-0.009/LibYAML/loader.c
--- old/YAML-LibYAML-API-0.008/LibYAML/loader.c 2020-02-19 13:56:45.000000000
+0100
+++ new/YAML-LibYAML-API-0.009/LibYAML/loader.c 2020-05-16 15:30:52.000000000
+0200
@@ -38,26 +38,46 @@
yaml_parser_delete_aliases(yaml_parser_t *parser);
/*
+ * Document loading context.
+ */
+struct loader_ctx {
+ int *start;
+ int *end;
+ int *top;
+};
+
+/*
* Composer functions.
*/
+static int
+yaml_parser_load_nodes(yaml_parser_t *parser, struct loader_ctx *ctx);
+
+static int
+yaml_parser_load_document(yaml_parser_t *parser, yaml_event_t *event);
static int
-yaml_parser_load_document(yaml_parser_t *parser, yaml_event_t *first_event);
+yaml_parser_load_alias(yaml_parser_t *parser, yaml_event_t *event,
+ struct loader_ctx *ctx);
static int
-yaml_parser_load_node(yaml_parser_t *parser, yaml_event_t *first_event);
+yaml_parser_load_scalar(yaml_parser_t *parser, yaml_event_t *event,
+ struct loader_ctx *ctx);
static int
-yaml_parser_load_alias(yaml_parser_t *parser, yaml_event_t *first_event);
+yaml_parser_load_sequence(yaml_parser_t *parser, yaml_event_t *event,
+ struct loader_ctx *ctx);
static int
-yaml_parser_load_scalar(yaml_parser_t *parser, yaml_event_t *first_event);
+yaml_parser_load_mapping(yaml_parser_t *parser, yaml_event_t *event,
+ struct loader_ctx *ctx);
static int
-yaml_parser_load_sequence(yaml_parser_t *parser, yaml_event_t *first_event);
+yaml_parser_load_sequence_end(yaml_parser_t *parser, yaml_event_t *event,
+ struct loader_ctx *ctx);
static int
-yaml_parser_load_mapping(yaml_parser_t *parser, yaml_event_t *first_event);
+yaml_parser_load_mapping_end(yaml_parser_t *parser, yaml_event_t *event,
+ struct loader_ctx *ctx);
/*
* Load the next document of the stream.
@@ -162,59 +182,78 @@
*/
static int
-yaml_parser_load_document(yaml_parser_t *parser, yaml_event_t *first_event)
+yaml_parser_load_document(yaml_parser_t *parser, yaml_event_t *event)
{
- yaml_event_t event;
+ struct loader_ctx ctx = { NULL, NULL, NULL };
- assert(first_event->type == YAML_DOCUMENT_START_EVENT);
+ assert(event->type == YAML_DOCUMENT_START_EVENT);
/* DOCUMENT-START is expected. */
parser->document->version_directive
- = first_event->data.document_start.version_directive;
+ = event->data.document_start.version_directive;
parser->document->tag_directives.start
- = first_event->data.document_start.tag_directives.start;
+ = event->data.document_start.tag_directives.start;
parser->document->tag_directives.end
- = first_event->data.document_start.tag_directives.end;
+ = event->data.document_start.tag_directives.end;
parser->document->start_implicit
- = first_event->data.document_start.implicit;
- parser->document->start_mark = first_event->start_mark;
-
- if (!yaml_parser_parse(parser, &event)) return 0;
-
- if (!yaml_parser_load_node(parser, &event)) return 0;
-
- if (!yaml_parser_parse(parser, &event)) return 0;
- assert(event.type == YAML_DOCUMENT_END_EVENT);
- /* DOCUMENT-END is expected. */
+ = event->data.document_start.implicit;
+ parser->document->start_mark = event->start_mark;
- parser->document->end_implicit = event.data.document_end.implicit;
- parser->document->end_mark = event.end_mark;
+ if (!STACK_INIT(parser, ctx, int*)) return 0;
+ if (!yaml_parser_load_nodes(parser, &ctx)) {
+ STACK_DEL(parser, ctx);
+ return 0;
+ }
+ STACK_DEL(parser, ctx);
return 1;
}
/*
- * Compose a node.
+ * Compose a node tree.
*/
static int
-yaml_parser_load_node(yaml_parser_t *parser, yaml_event_t *first_event)
+yaml_parser_load_nodes(yaml_parser_t *parser, struct loader_ctx *ctx)
{
- switch (first_event->type) {
- case YAML_ALIAS_EVENT:
- return yaml_parser_load_alias(parser, first_event);
- case YAML_SCALAR_EVENT:
- return yaml_parser_load_scalar(parser, first_event);
- case YAML_SEQUENCE_START_EVENT:
- return yaml_parser_load_sequence(parser, first_event);
- case YAML_MAPPING_START_EVENT:
- return yaml_parser_load_mapping(parser, first_event);
- default:
- assert(0); /* Could not happen. */
- return 0;
- }
+ yaml_event_t event;
- return 0;
+ do {
+ if (!yaml_parser_parse(parser, &event)) return 0;
+
+ switch (event.type) {
+ case YAML_ALIAS_EVENT:
+ if (!yaml_parser_load_alias(parser, &event, ctx)) return 0;
+ break;
+ case YAML_SCALAR_EVENT:
+ if (!yaml_parser_load_scalar(parser, &event, ctx)) return 0;
+ break;
+ case YAML_SEQUENCE_START_EVENT:
+ if (!yaml_parser_load_sequence(parser, &event, ctx)) return 0;
+ break;
+ case YAML_SEQUENCE_END_EVENT:
+ if (!yaml_parser_load_sequence_end(parser, &event, ctx))
+ return 0;
+ break;
+ case YAML_MAPPING_START_EVENT:
+ if (!yaml_parser_load_mapping(parser, &event, ctx)) return 0;
+ break;
+ case YAML_MAPPING_END_EVENT:
+ if (!yaml_parser_load_mapping_end(parser, &event, ctx))
+ return 0;
+ break;
+ default:
+ assert(0); /* Could not happen. */
+ return 0;
+ case YAML_DOCUMENT_END_EVENT:
+ break;
+ }
+ } while (event.type != YAML_DOCUMENT_END_EVENT);
+
+ parser->document->end_implicit = event.data.document_end.implicit;
+ parser->document->end_mark = event.end_mark;
+
+ return 1;
}
/*
@@ -253,26 +292,79 @@
}
/*
+ * Compose node into its parent in the stree.
+ */
+
+static int
+yaml_parser_load_node_add(yaml_parser_t *parser, struct loader_ctx *ctx,
+ int index)
+{
+ struct yaml_node_s *parent;
+ int parent_index;
+
+ if (STACK_EMPTY(parser, *ctx)) {
+ /* This is the root node, there's no tree to add it to. */
+ return 1;
+ }
+
+ parent_index = *((*ctx).top - 1);
+ parent = &parser->document->nodes.start[parent_index-1];
+
+ switch (parent->type) {
+ case YAML_SEQUENCE_NODE:
+ if (!STACK_LIMIT(parser, parent->data.sequence.items, INT_MAX-1))
+ return 0;
+ if (!PUSH(parser, parent->data.sequence.items, index))
+ return 0;
+ break;
+ case YAML_MAPPING_NODE: {
+ yaml_node_pair_t pair;
+ if (!STACK_EMPTY(parser, parent->data.mapping.pairs)) {
+ yaml_node_pair_t *p = parent->data.mapping.pairs.top - 1;
+ if (p->key != 0 && p->value == 0) {
+ p->value = index;
+ break;
+ }
+ }
+
+ pair.key = index;
+ pair.value = 0;
+ if (!STACK_LIMIT(parser, parent->data.mapping.pairs, INT_MAX-1))
+ return 0;
+ if (!PUSH(parser, parent->data.mapping.pairs, pair))
+ return 0;
+
+ break;
+ }
+ default:
+ assert(0); /* Could not happen. */
+ return 0;
+ }
+ return 1;
+}
+
+/*
* Compose a node corresponding to an alias.
*/
static int
-yaml_parser_load_alias(yaml_parser_t *parser, yaml_event_t *first_event)
+yaml_parser_load_alias(yaml_parser_t *parser, yaml_event_t *event,
+ struct loader_ctx *ctx)
{
- yaml_char_t *anchor = first_event->data.alias.anchor;
+ yaml_char_t *anchor = event->data.alias.anchor;
yaml_alias_data_t *alias_data;
for (alias_data = parser->aliases.start;
alias_data != parser->aliases.top; alias_data ++) {
if (strcmp((char *)alias_data->anchor, (char *)anchor) == 0) {
yaml_free(anchor);
- return alias_data->index;
+ return yaml_parser_load_node_add(parser, ctx, alias_data->index);
}
}
yaml_free(anchor);
return yaml_parser_set_composer_error(parser, "found undefined alias",
- first_event->start_mark);
+ event->start_mark);
}
/*
@@ -280,11 +372,12 @@
*/
static int
-yaml_parser_load_scalar(yaml_parser_t *parser, yaml_event_t *first_event)
+yaml_parser_load_scalar(yaml_parser_t *parser, yaml_event_t *event,
+ struct loader_ctx *ctx)
{
yaml_node_t node;
int index;
- yaml_char_t *tag = first_event->data.scalar.tag;
+ yaml_char_t *tag = event->data.scalar.tag;
if (!STACK_LIMIT(parser, parser->document->nodes, INT_MAX-1)) goto error;
@@ -294,23 +387,23 @@
if (!tag) goto error;
}
- SCALAR_NODE_INIT(node, tag, first_event->data.scalar.value,
- first_event->data.scalar.length, first_event->data.scalar.style,
- first_event->start_mark, first_event->end_mark);
+ SCALAR_NODE_INIT(node, tag, event->data.scalar.value,
+ event->data.scalar.length, event->data.scalar.style,
+ event->start_mark, event->end_mark);
if (!PUSH(parser, parser->document->nodes, node)) goto error;
index = parser->document->nodes.top - parser->document->nodes.start;
if (!yaml_parser_register_anchor(parser, index,
- first_event->data.scalar.anchor)) return 0;
+ event->data.scalar.anchor)) return 0;
- return index;
+ return yaml_parser_load_node_add(parser, ctx, index);
error:
yaml_free(tag);
- yaml_free(first_event->data.scalar.anchor);
- yaml_free(first_event->data.scalar.value);
+ yaml_free(event->data.scalar.anchor);
+ yaml_free(event->data.scalar.value);
return 0;
}
@@ -319,17 +412,17 @@
*/
static int
-yaml_parser_load_sequence(yaml_parser_t *parser, yaml_event_t *first_event)
+yaml_parser_load_sequence(yaml_parser_t *parser, yaml_event_t *event,
+ struct loader_ctx *ctx)
{
- yaml_event_t event;
yaml_node_t node;
struct {
yaml_node_item_t *start;
yaml_node_item_t *end;
yaml_node_item_t *top;
} items = { NULL, NULL, NULL };
- int index, item_index;
- yaml_char_t *tag = first_event->data.sequence_start.tag;
+ int index;
+ yaml_char_t *tag = event->data.sequence_start.tag;
if (!STACK_LIMIT(parser, parser->document->nodes, INT_MAX-1)) goto error;
@@ -342,48 +435,54 @@
if (!STACK_INIT(parser, items, yaml_node_item_t*)) goto error;
SEQUENCE_NODE_INIT(node, tag, items.start, items.end,
- first_event->data.sequence_start.style,
- first_event->start_mark, first_event->end_mark);
+ event->data.sequence_start.style,
+ event->start_mark, event->end_mark);
if (!PUSH(parser, parser->document->nodes, node)) goto error;
index = parser->document->nodes.top - parser->document->nodes.start;
if (!yaml_parser_register_anchor(parser, index,
- first_event->data.sequence_start.anchor)) return 0;
+ event->data.sequence_start.anchor)) return 0;
- if (!yaml_parser_parse(parser, &event)) return 0;
+ if (!yaml_parser_load_node_add(parser, ctx, index)) return 0;
- while (event.type != YAML_SEQUENCE_END_EVENT) {
- if (!STACK_LIMIT(parser,
- parser->document->nodes.start[index-1].data.sequence.items,
- INT_MAX-1)) return 0;
- item_index = yaml_parser_load_node(parser, &event);
- if (!item_index) return 0;
- if (!PUSH(parser,
- parser->document->nodes.start[index-1].data.sequence.items,
- item_index)) return 0;
- if (!yaml_parser_parse(parser, &event)) return 0;
- }
-
- parser->document->nodes.start[index-1].end_mark = event.end_mark;
+ if (!STACK_LIMIT(parser, *ctx, INT_MAX-1)) return 0;
+ if (!PUSH(parser, *ctx, index)) return 0;
- return index;
+ return 1;
error:
yaml_free(tag);
- yaml_free(first_event->data.sequence_start.anchor);
+ yaml_free(event->data.sequence_start.anchor);
return 0;
}
+static int
+yaml_parser_load_sequence_end(yaml_parser_t *parser, yaml_event_t *event,
+ struct loader_ctx *ctx)
+{
+ int index;
+
+ assert(((*ctx).top - (*ctx).start) > 0);
+
+ index = *((*ctx).top - 1);
+ assert(parser->document->nodes.start[index-1].type == YAML_SEQUENCE_NODE);
+ parser->document->nodes.start[index-1].end_mark = event->end_mark;
+
+ (void)POP(parser, *ctx);
+
+ return 1;
+}
+
/*
* Compose a mapping node.
*/
static int
-yaml_parser_load_mapping(yaml_parser_t *parser, yaml_event_t *first_event)
+yaml_parser_load_mapping(yaml_parser_t *parser, yaml_event_t *event,
+ struct loader_ctx *ctx)
{
- yaml_event_t event;
yaml_node_t node;
struct {
yaml_node_pair_t *start;
@@ -391,8 +490,7 @@
yaml_node_pair_t *top;
} pairs = { NULL, NULL, NULL };
int index;
- yaml_node_pair_t pair;
- yaml_char_t *tag = first_event->data.mapping_start.tag;
+ yaml_char_t *tag = event->data.mapping_start.tag;
if (!STACK_LIMIT(parser, parser->document->nodes, INT_MAX-1)) goto error;
@@ -405,40 +503,42 @@
if (!STACK_INIT(parser, pairs, yaml_node_pair_t*)) goto error;
MAPPING_NODE_INIT(node, tag, pairs.start, pairs.end,
- first_event->data.mapping_start.style,
- first_event->start_mark, first_event->end_mark);
+ event->data.mapping_start.style,
+ event->start_mark, event->end_mark);
if (!PUSH(parser, parser->document->nodes, node)) goto error;
index = parser->document->nodes.top - parser->document->nodes.start;
if (!yaml_parser_register_anchor(parser, index,
- first_event->data.mapping_start.anchor)) return 0;
+ event->data.mapping_start.anchor)) return 0;
- if (!yaml_parser_parse(parser, &event)) return 0;
-
- while (event.type != YAML_MAPPING_END_EVENT) {
- if (!STACK_LIMIT(parser,
- parser->document->nodes.start[index-1].data.mapping.pairs,
- INT_MAX-1)) return 0;
- pair.key = yaml_parser_load_node(parser, &event);
- if (!pair.key) return 0;
- if (!yaml_parser_parse(parser, &event)) return 0;
- pair.value = yaml_parser_load_node(parser, &event);
- if (!pair.value) return 0;
- if (!PUSH(parser,
- parser->document->nodes.start[index-1].data.mapping.pairs,
- pair)) return 0;
- if (!yaml_parser_parse(parser, &event)) return 0;
- }
+ if (!yaml_parser_load_node_add(parser, ctx, index)) return 0;
- parser->document->nodes.start[index-1].end_mark = event.end_mark;
+ if (!STACK_LIMIT(parser, *ctx, INT_MAX-1)) return 0;
+ if (!PUSH(parser, *ctx, index)) return 0;
- return index;
+ return 1;
error:
yaml_free(tag);
- yaml_free(first_event->data.mapping_start.anchor);
+ yaml_free(event->data.mapping_start.anchor);
return 0;
}
+static int
+yaml_parser_load_mapping_end(yaml_parser_t *parser, yaml_event_t *event,
+ struct loader_ctx *ctx)
+{
+ int index;
+
+ assert(((*ctx).top - (*ctx).start) > 0);
+
+ index = *((*ctx).top - 1);
+ assert(parser->document->nodes.start[index-1].type == YAML_MAPPING_NODE);
+ parser->document->nodes.start[index-1].end_mark = event->end_mark;
+
+ (void)POP(parser, *ctx);
+
+ return 1;
+}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/LibYAML/parser.c
new/YAML-LibYAML-API-0.009/LibYAML/parser.c
--- old/YAML-LibYAML-API-0.008/LibYAML/parser.c 2020-02-19 13:56:45.000000000
+0100
+++ new/YAML-LibYAML-API-0.009/LibYAML/parser.c 2020-05-16 15:30:52.000000000
+0200
@@ -1261,7 +1261,10 @@
goto error;
}
if (token->data.version_directive.major != 1
- || token->data.version_directive.minor != 1) {
+ || (
+ token->data.version_directive.minor != 1
+ && token->data.version_directive.minor != 2
+ )) {
yaml_parser_set_parser_error(parser,
"found incompatible YAML document", token->start_mark);
goto error;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/LibYAML/scanner.c
new/YAML-LibYAML-API-0.009/LibYAML/scanner.c
--- old/YAML-LibYAML-API-0.008/LibYAML/scanner.c 2020-02-19
13:56:45.000000000 +0100
+++ new/YAML-LibYAML-API-0.009/LibYAML/scanner.c 2020-05-16
15:30:52.000000000 +0200
@@ -348,6 +348,7 @@
* SCALAR("another value",plain)
* KEY
* SCALAR("a mapping",plain)
+ * VALUE
* BLOCK-MAPPING-START
* KEY
* SCALAR("key 1",plain)
@@ -3518,12 +3519,12 @@
{
if (IS_BLANK(parser->buffer))
{
- /* Check for tab character that abuse indentation. */
+ /* Check for tab characters that abuse indentation. */
if (leading_blanks && (int)parser->mark.column < indent
&& IS_TAB(parser->buffer)) {
yaml_parser_set_scanner_error(parser, "while scanning a
plain scalar",
- start_mark, "found a tab character that violate
indentation");
+ start_mark, "found a tab character that violates
indentation");
goto error;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/LibYAML/yaml.h
new/YAML-LibYAML-API-0.009/LibYAML/yaml.h
--- old/YAML-LibYAML-API-0.008/LibYAML/yaml.h 2020-02-19 13:56:45.000000000
+0100
+++ new/YAML-LibYAML-API-0.009/LibYAML/yaml.h 2020-05-16 15:30:52.000000000
+0200
@@ -28,7 +28,7 @@
#if defined(__MINGW32__)
# define YAML_DECLARE(type) type
-#elif defined(WIN32)
+#elif defined(_WIN32)
# if defined(YAML_DECLARE_STATIC)
# define YAML_DECLARE(type) type
# elif defined(YAML_DECLARE_EXPORT)
@@ -552,7 +552,7 @@
*/
YAML_DECLARE(int)
-yaml_alias_event_initialize(yaml_event_t *event, yaml_char_t *anchor);
+yaml_alias_event_initialize(yaml_event_t *event, const yaml_char_t *anchor);
/**
* Create a SCALAR event.
@@ -578,8 +578,8 @@
YAML_DECLARE(int)
yaml_scalar_event_initialize(yaml_event_t *event,
- yaml_char_t *anchor, yaml_char_t *tag,
- yaml_char_t *value, int length,
+ const yaml_char_t *anchor, const yaml_char_t *tag,
+ const yaml_char_t *value, int length,
int plain_implicit, int quoted_implicit,
yaml_scalar_style_t style);
@@ -601,7 +601,7 @@
YAML_DECLARE(int)
yaml_sequence_start_event_initialize(yaml_event_t *event,
- yaml_char_t *anchor, yaml_char_t *tag, int implicit,
+ const yaml_char_t *anchor, const yaml_char_t *tag, int implicit,
yaml_sequence_style_t style);
/**
@@ -633,7 +633,7 @@
YAML_DECLARE(int)
yaml_mapping_start_event_initialize(yaml_event_t *event,
- yaml_char_t *anchor, yaml_char_t *tag, int implicit,
+ const yaml_char_t *anchor, const yaml_char_t *tag, int implicit,
yaml_mapping_style_t style);
/**
@@ -896,7 +896,7 @@
YAML_DECLARE(int)
yaml_document_add_scalar(yaml_document_t *document,
- yaml_char_t *tag, yaml_char_t *value, int length,
+ const yaml_char_t *tag, const yaml_char_t *value, int length,
yaml_scalar_style_t style);
/**
@@ -913,7 +913,7 @@
YAML_DECLARE(int)
yaml_document_add_sequence(yaml_document_t *document,
- yaml_char_t *tag, yaml_sequence_style_t style);
+ const yaml_char_t *tag, yaml_sequence_style_t style);
/**
* Create a MAPPING node and attach it to the document.
@@ -929,7 +929,7 @@
YAML_DECLARE(int)
yaml_document_add_mapping(yaml_document_t *document,
- yaml_char_t *tag, yaml_mapping_style_t style);
+ const yaml_char_t *tag, yaml_mapping_style_t style);
/**
* Add an item to a SEQUENCE node.
@@ -937,7 +937,7 @@
* @param[in,out] document A document object.
* @param[in] sequence The sequence node id.
* @param[in] item The item node id.
-*
+ *
* @returns @c 1 if the function succeeded, @c 0 on error.
*/
@@ -952,7 +952,7 @@
* @param[in] mapping The mapping node id.
* @param[in] key The key node id.
* @param[in] value The value node id.
-*
+ *
* @returns @c 1 if the function succeeded, @c 0 on error.
*/
@@ -1205,7 +1205,7 @@
/** The number of tokens fetched from the queue. */
size_t tokens_parsed;
- /* Does the tokens queue contain a token ready for dequeueing. */
+ /** Does the tokens queue contain a token ready for dequeueing. */
int token_available;
/** The indentation levels stack. */
@@ -1446,7 +1446,7 @@
* @param[in,out] parser A parser object.
* @param[out] document An empty document object.
*
- * @return @c 1 if the function succeeded, @c 0 on error.
+ * @returns @c 1 if the function succeeded, @c 0 on error.
*/
YAML_DECLARE(int)
@@ -1560,7 +1560,7 @@
/** Write handler. */
yaml_write_handler_t *write_handler;
- /** A pointer for passing to the white handler. */
+ /** A pointer for passing to the write handler. */
void *write_handler_data;
/** Standard (string or file) output data. */
@@ -1858,7 +1858,7 @@
yaml_emitter_set_canonical(yaml_emitter_t *emitter, int canonical);
/**
- * Set the intendation increment.
+ * Set the indentation increment.
*
* @param[in,out] emitter An emitter object.
* @param[in] indent The indentation increment (1 < . < 10).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/MANIFEST
new/YAML-LibYAML-API-0.009/MANIFEST
--- old/YAML-LibYAML-API-0.008/MANIFEST 2020-02-19 13:56:45.000000000 +0100
+++ new/YAML-LibYAML-API-0.009/MANIFEST 2020-05-16 15:30:52.000000000 +0200
@@ -28,4 +28,5 @@
t/00.compile.t
t/10.basic.t
t/11.anchors.t
+t/12.version.t
t/data/simple.yaml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/META.json
new/YAML-LibYAML-API-0.009/META.json
--- old/YAML-LibYAML-API-0.008/META.json 2020-02-19 13:56:45.000000000
+0100
+++ new/YAML-LibYAML-API-0.009/META.json 2020-05-16 15:30:52.000000000
+0200
@@ -45,11 +45,11 @@
"provides" : {
"YAML::LibYAML::API" : {
"file" : "lib/YAML/LibYAML/API.pm",
- "version" : "0.008"
+ "version" : "0.009"
},
"YAML::LibYAML::API::XS" : {
"file" : "LibYAML/lib/YAML/LibYAML/API/XS.pm",
- "version" : "0.008"
+ "version" : "0.009"
}
},
"release_status" : "stable",
@@ -63,8 +63,8 @@
"web" : "https://github.com/perlpunk/YAML-LibYAML-API-p5"
}
},
- "version" : "0.008",
+ "version" : "0.009",
"x_generated_by_perl" : "v5.24.1",
- "x_serialization_backend" : "Cpanel::JSON::XS version 4.02"
+ "x_serialization_backend" : "Cpanel::JSON::XS version 4.19"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/META.yml
new/YAML-LibYAML-API-0.009/META.yml
--- old/YAML-LibYAML-API-0.008/META.yml 2020-02-19 13:56:45.000000000 +0100
+++ new/YAML-LibYAML-API-0.009/META.yml 2020-05-16 15:30:52.000000000 +0200
@@ -24,10 +24,10 @@
provides:
YAML::LibYAML::API:
file: lib/YAML/LibYAML/API.pm
- version: '0.008'
+ version: '0.009'
YAML::LibYAML::API::XS:
file: LibYAML/lib/YAML/LibYAML/API/XS.pm
- version: '0.008'
+ version: '0.009'
requires:
XSLoader: '0'
YAML::PP::Common: '0'
@@ -37,6 +37,6 @@
resources:
bugtracker: https://github.com/perlpunk/YAML-LibYAML-API-p5/issues
repository: https://github.com/perlpunk/YAML-LibYAML-API-p5
-version: '0.008'
+version: '0.009'
x_generated_by_perl: v5.24.1
x_serialization_backend: 'YAML::Tiny version 1.73'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/Makefile.PL
new/YAML-LibYAML-API-0.009/Makefile.PL
--- old/YAML-LibYAML-API-0.008/Makefile.PL 2020-02-19 13:56:45.000000000
+0100
+++ new/YAML-LibYAML-API-0.009/Makefile.PL 2020-05-16 15:30:52.000000000
+0200
@@ -32,7 +32,7 @@
"YAML::PP" => "0.018",
"blib" => "1.01"
},
- "VERSION" => "0.008",
+ "VERSION" => "0.009",
"test" => {
"TESTS" => "t/*.t"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/README
new/YAML-LibYAML-API-0.009/README
--- old/YAML-LibYAML-API-0.008/README 2020-02-19 13:56:45.000000000 +0100
+++ new/YAML-LibYAML-API-0.009/README 2020-05-16 15:30:52.000000000 +0200
@@ -1,5 +1,5 @@
This archive contains the distribution YAML-LibYAML-API,
-version 0.008:
+version 0.009:
Wrapper around the C libyaml library
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/dist.ini
new/YAML-LibYAML-API-0.009/dist.ini
--- old/YAML-LibYAML-API-0.008/dist.ini 2020-02-19 13:56:45.000000000 +0100
+++ new/YAML-LibYAML-API-0.009/dist.ini 2020-05-16 15:30:52.000000000 +0200
@@ -4,7 +4,7 @@
copyright_holder = Tina Müller
copyright_year = 2020
-version = 0.008
+version = 0.009
[@Filter]
-bundle = @Basic
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/lib/YAML/LibYAML/API.pm
new/YAML-LibYAML-API-0.009/lib/YAML/LibYAML/API.pm
--- old/YAML-LibYAML-API-0.008/lib/YAML/LibYAML/API.pm 2020-02-19
13:56:45.000000000 +0100
+++ new/YAML-LibYAML-API-0.009/lib/YAML/LibYAML/API.pm 2020-05-16
15:30:52.000000000 +0200
@@ -3,7 +3,7 @@
use strict;
use warnings;
-our $VERSION = '0.008'; # VERSION
+our $VERSION = '0.009'; # VERSION
use YAML::PP::Common qw/
YAML_ANY_SCALAR_STYLE YAML_PLAIN_SCALAR_STYLE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-API-0.008/t/12.version.t
new/YAML-LibYAML-API-0.009/t/12.version.t
--- old/YAML-LibYAML-API-0.008/t/12.version.t 1970-01-01 01:00:00.000000000
+0100
+++ new/YAML-LibYAML-API-0.009/t/12.version.t 2020-05-16 15:30:52.000000000
+0200
@@ -0,0 +1,100 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+use FindBin '$Bin';
+
+use Encode;
+use YAML::LibYAML::API;
+use YAML::LibYAML::API::XS;
+use YAML::PP::Common qw/
+ YAML_ANY_SCALAR_STYLE YAML_PLAIN_SCALAR_STYLE
+ YAML_SINGLE_QUOTED_SCALAR_STYLE YAML_DOUBLE_QUOTED_SCALAR_STYLE
+ YAML_LITERAL_SCALAR_STYLE YAML_FOLDED_SCALAR_STYLE
+/;
+
+my $yaml = <<'EOM';
+z: 1
+a: 2
+y: YES
+b: 0b10
+x:
+ y: z
+...
+%YAML 1.2
+--- &yes
+- YES
+- 0b10
+- *yes
+EOM
+
+my $exp = <<'EOM';
+z: 1
+a: 2
+y: YES
+b: 0b10
+x:
+ y: z
+...
+%YAML 1.2
+--- &yes
+- YES
+- 0b10
+- *yes
+EOM
+
+my @exp_events = (
+ { name => 'stream_start_event' },
+ { name => 'document_start_event', implicit => 1 },
+ { name => 'mapping_start_event', style => 'block', },
+
+ { name => 'scalar_event', value => 'z', style => YAML_PLAIN_SCALAR_STYLE },
+ { name => 'scalar_event', value => '1', style => YAML_PLAIN_SCALAR_STYLE },
+ { name => 'scalar_event', value => 'a', style => YAML_PLAIN_SCALAR_STYLE },
+ { name => 'scalar_event', value => '2', style => YAML_PLAIN_SCALAR_STYLE },
+ { name => 'scalar_event', value => 'y', style => YAML_PLAIN_SCALAR_STYLE },
+ { name => 'scalar_event', value => 'YES', style => YAML_PLAIN_SCALAR_STYLE
},
+ { name => 'scalar_event', value => 'b', style => YAML_PLAIN_SCALAR_STYLE },
+ { name => 'scalar_event', value => '0b10', style =>
YAML_PLAIN_SCALAR_STYLE },
+ { name => 'scalar_event', value => 'x', style => YAML_PLAIN_SCALAR_STYLE },
+ { name => 'mapping_start_event', style => 'block', },
+ { name => 'scalar_event', value => 'y', style => YAML_PLAIN_SCALAR_STYLE },
+ { name => 'scalar_event', value => 'z', style => YAML_PLAIN_SCALAR_STYLE },
+ { name => 'mapping_end_event' },
+ { name => 'mapping_end_event' },
+
+ { name => 'document_end_event' },
+
+ {
+ name => 'document_start_event',
+ version_directive => { major => 1, minor => 2 },
+ },
+
+ { name => 'sequence_start_event', style => 'block', anchor => 'yes' },
+ { name => 'scalar_event', value => 'YES', style => YAML_PLAIN_SCALAR_STYLE
},
+ { name => 'scalar_event', value => '0b10', style =>
YAML_PLAIN_SCALAR_STYLE },
+
+ { name => 'alias_event', value => 'yes' },
+ { name => 'sequence_end_event' },
+
+ { name => 'document_end_event', implicit => 1 },
+ { name => 'stream_end_event' },
+);
+
+subtest parse_string_events => sub {
+ my $ev = [];
+ YAML::LibYAML::API::parse_string_events($yaml, $ev);
+
+ my @ts = map { YAML::PP::Common::event_to_test_suite($_) } @$ev;
+ delete $_->{end}, delete $_->{start} for @$ev;
+ is_deeply($ev, \@exp_events, "parse_events - Test Suite Events match") or
+ do { diag $_ for @ts };
+
+ my $options = { indent => 4 };
+ my $emit = YAML::LibYAML::API::emit_string_events($ev, $options);
+ cmp_ok($emit, 'eq', $exp, 'Emitted doc like expected');
+};
+
+done_testing;
+