Hello community,
here is the log from the commit of package perl-JSON-XS for openSUSE:Factory
checked in at Tue Jan 18 01:12:45 CET 2011.
--------
--- perl-JSON-XS/perl-JSON-XS.changes 2010-12-01 14:47:47.000000000 +0100
+++ perl-JSON-XS/perl-JSON-XS.changes 2011-01-17 21:11:11.000000000 +0100
@@ -1,0 +2,10 @@
+Mon Jan 17 20:09:30 UTC 2011 - coolo@novell.com
+
+- update to 2.3(0)
+ - make sure decoder doesn't change the decoding in the incremental
+ parser (testcase provided by Hendrik Schumacher).
+ - applied patch by DaTa for Data::Dumper support in json_xs.
+ - added -t dump support to json_xs, using Data::Dump.
+ - added -f eval support to json_xs.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
JSON-XS-2.29.tar.bz2
New:
----
JSON-XS-2.3.tar.bz2
fixversion.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-JSON-XS.spec ++++++
--- /var/tmp/diff_new_pack.Sy0o6X/_old 2011-01-18 01:11:59.000000000 +0100
+++ /var/tmp/diff_new_pack.Sy0o6X/_new 2011-01-18 01:11:59.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package perl-JSON-XS (Version 2.29)
+# spec file for package perl-JSON-XS
#
-# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -21,13 +21,14 @@
Name: perl-JSON-XS
%define cpan_name JSON-XS
Summary: JSON serialising/deserialising, done correctly and fast
-Version: 2.29
-Release: 2
+Version: 2.30
+Release: 1
License: GPL+ or Artistic
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/JSON-XS/
#Source: http://www.cpan.org/modules/by-module/JSON/JSON-XS-%{version}.tar.gz
-Source: %{cpan_name}-%{version}.tar.bz2
+Source: %{cpan_name}-2.3.tar.bz2
+Patch0: fixversion.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: perl
@@ -59,7 +60,8 @@
Marc Lehmann
%prep
-%setup -q -n %{cpan_name}-%{version}
+%setup -q -n %{cpan_name}-2.3
+%patch0 -p1
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
++++++ JSON-XS-2.29.tar.bz2 -> JSON-XS-2.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-XS-2.29/Changes new/JSON-XS-2.3/Changes
--- old/JSON-XS-2.29/Changes 2010-03-17 02:39:14.000000000 +0100
+++ new/JSON-XS-2.3/Changes 2010-08-18 01:27:06.000000000 +0200
@@ -1,5 +1,12 @@
Revision history for Perl extension JSON::XS
+2.3 Wed Aug 18 01:26:47 CEST 2010
+ - make sure decoder doesn't change the decoding in the incremental
+ parser (testcase provided by Hendrik Schumacher).
+ - applied patch by DaTa for Data::Dumper support in json_xs.
+ - added -t dump support to json_xs, using Data::Dump.
+ - added -f eval support to json_xs.
+
2.29 Wed Mar 17 02:39:12 CET 2010
- fix a memory leak when callbacks set using filter_json_object
or filter_json_single_key_object were called (great testcase
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-XS-2.29/META.json new/JSON-XS-2.3/META.json
--- old/JSON-XS-2.29/META.json 2010-03-17 02:45:35.000000000 +0100
+++ new/JSON-XS-2.3/META.json 2010-08-18 01:27:20.000000000 +0200
@@ -1 +1 @@
-{"no_index":{"directory":["t","inc"]},"meta-spec":{"version":1.4,"url":"http://module-build.sourceforge.net/META-spec-v1.4.html"},"generated_by":"ExtUtils::MakeMaker version 6.54","distribution_type":"module","version":"2.29","name":"JSON-XS","author":[],"license":"unknown","build_requires":{"ExtUtils::MakeMaker":0},"requires":{"common::sense":0},"abstract":null,"configure_requires":{"ExtUtils::MakeMaker":0}}
+{"no_index":{"directory":["t","inc"]},"meta-spec":{"version":1.4,"url":"http://module-build.sourceforge.net/META-spec-v1.4.html"},"generated_by":"ExtUtils::MakeMaker version 6.56","distribution_type":"module","version":"2.3","name":"JSON-XS","author":[],"license":"unknown","build_requires":{"ExtUtils::MakeMaker":0},"requires":{"common::sense":0},"abstract":null,"configure_requires":{"ExtUtils::MakeMaker":0}}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-XS-2.29/META.yml new/JSON-XS-2.3/META.yml
--- old/JSON-XS-2.29/META.yml 2010-03-17 02:45:35.000000000 +0100
+++ new/JSON-XS-2.3/META.yml 2010-08-18 01:27:20.000000000 +0200
@@ -9,9 +9,9 @@
"version" : 1.4,
"url" : "http://module-build.sourceforge.net/META-spec-v1.4.html"
},
- "generated_by" : "ExtUtils::MakeMaker version 6.54",
+ "generated_by" : "ExtUtils::MakeMaker version 6.56",
"distribution_type" : "module",
- "version" : "2.29",
+ "version" : "2.3",
"name" : "JSON-XS",
"author" : [],
"license" : "unknown",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-XS-2.29/XS.pm new/JSON-XS-2.3/XS.pm
--- old/JSON-XS-2.29/XS.pm 2010-03-17 02:45:14.000000000 +0100
+++ new/JSON-XS-2.3/XS.pm 2010-08-18 01:27:03.000000000 +0200
@@ -103,7 +103,7 @@
use common::sense;
-our $VERSION = '2.29';
+our $VERSION = '2.3';
our @ISA = qw(Exporter);
our @EXPORT = qw(encode_json decode_json to_json from_json);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-XS-2.29/XS.xs new/JSON-XS-2.3/XS.xs
--- old/JSON-XS-2.29/XS.xs 2010-03-17 02:42:08.000000000 +0100
+++ new/JSON-XS-2.3/XS.xs 2010-08-18 01:14:53.000000000 +0200
@@ -44,6 +44,8 @@
#define SHORT_STRING_LEN 16384 // special-case strings of up to this size
+#define DECODE_WANTS_OCTETS(json) ((json)->flags & F_UTF8)
+
#define SB do {
#define SE } while (0)
@@ -1550,7 +1552,7 @@
(unsigned long)SvCUR (string), (unsigned long)json->max_size);
}
- if (json->flags & F_UTF8)
+ if (DECODE_WANTS_OCTETS (json))
sv_utf8_downgrade (string, 0);
else
sv_utf8_upgrade (string);
@@ -1931,24 +1933,36 @@
if (!self->incr_text)
self->incr_text = newSVpvn ("", 0);
+ /* if utf8-ness doesn't match the decoder, need to upgrade/downgrade */
+ if (!DECODE_WANTS_OCTETS (self) == !SvUTF8 (self->incr_text))
+ if (DECODE_WANTS_OCTETS (self))
+ {
+ if (self->incr_pos)
+ self->incr_pos = utf8_length ((U8 *)SvPVX (self->incr_text),
+ (U8 *)SvPVX (self->incr_text) + self->incr_pos);
+
+ sv_utf8_downgrade (self->incr_text, 0);
+ }
+ else
+ {
+ sv_utf8_upgrade (self->incr_text);
+
+ if (self->incr_pos)
+ self->incr_pos = utf8_hop ((U8 *)SvPVX (self->incr_text), self->incr_pos)
+ - (U8 *)SvPVX (self->incr_text);
+ }
+
// append data, if any
if (jsonstr)
{
- if (SvUTF8 (jsonstr))
- {
- if (!SvUTF8 (self->incr_text))
- {
- /* utf-8-ness differs, need to upgrade */
- sv_utf8_upgrade (self->incr_text);
-
- if (self->incr_pos)
- self->incr_pos = utf8_hop ((U8 *)SvPVX (self->incr_text), self->incr_pos)
- - (U8 *)SvPVX (self->incr_text);
- }
- }
- else if (SvUTF8 (self->incr_text))
- sv_utf8_upgrade (jsonstr);
+ /* make sure both strings have same encoding */
+ if (SvUTF8 (jsonstr) != SvUTF8 (self->incr_text))
+ if (SvUTF8 (jsonstr))
+ sv_utf8_downgrade (jsonstr, 0);
+ else
+ sv_utf8_upgrade (jsonstr);
+ /* and then just blindly append */
{
STRLEN len;
const char *str = SvPV (jsonstr, len);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-XS-2.29/bin/json_xs new/JSON-XS-2.3/bin/json_xs
--- old/JSON-XS-2.29/bin/json_xs 2008-07-27 11:11:33.000000000 +0200
+++ new/JSON-XS-2.3/bin/json_xs 2010-08-18 01:26:27.000000000 +0200
@@ -42,13 +42,15 @@
=item yaml - YAML (avoid at all costs, requires the YAML module :)
+=item eval - evaluate the given code as (non-utf-8) Perl, basically the reverse of "-t dump"
+
=back
=item -t toformat
Write the file in the given format to STDOUT.
-C<fromformat> can be one of:
+C<toformat> can be one of:
=over 4
@@ -68,6 +70,13 @@
=item yaml - YAML
+=item dump - Data::Dump
+
+=item dumper - Data::Dumper
+
+Note that Data::Dumper doesn't handle self-referential data structures
+correctly - use "dump" instead.
+
=back
=back
@@ -138,6 +147,7 @@
"storable-file" => sub { open my $fh, "<", \$_; Storable::fd_retrieve $fh },
"clzf" => sub { require Compress::LZF; Compress::LZF::sthaw ($_) },
"yaml" => sub { require YAML; YAML::Load ($_) },
+ "eval" => sub { my $v = eval "no strict; no warnings; no utf8;\n#line 1 \"input\"\n$_"; die "$@" if $@; $v },
);
my %T = (
@@ -155,6 +165,21 @@
"clzf" => sub { require Compress::LZF; Compress::LZF::sfreeze_cr ($_) },
"yaml" => sub { require YAML; YAML::Dump ($_) },
+ "dumper" => sub {
+ require Data::Dumper;
+ #local $Data::Dumper::Purity = 1; # hopeless case
+ local $Data::Dumper::Terse = 1;
+ local $Data::Dumper::Indent = 1;
+ local $Data::Dumper::Useqq = 1;
+ local $Data::Dumper::Quotekeys = 0;
+ local $Data::Dumper::Sortkeys = 1;
+ Data::Dumper::Dumper($_)
+ },
+ "dump" => sub {
+ require Data::Dump;
+ local $Data::Dump::TRY_BASE64 = 0;
+ Data::Dump::dump ($_) . "\n"
+ },
);
$F{$opt_from}
++++++ fixversion.diff ++++++
rpm has a different semantic for versions
Index: JSON-XS-2.3/XS.pm
===================================================================
--- JSON-XS-2.3.orig/XS.pm 2010-08-18 01:27:03.000000000 +0200
+++ JSON-XS-2.3/XS.pm 2011-01-17 21:42:08.477314137 +0100
@@ -103,7 +103,7 @@ package JSON::XS;
use common::sense;
-our $VERSION = '2.3';
+our $VERSION = '2.30';
our @ISA = qw(Exporter);
our @EXPORT = qw(encode_json decode_json to_json from_json);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org