Hello community,

here is the log from the commit of package perl-JSON-XS for openSUSE:Factory 
checked in at 2016-11-18 22:02:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-JSON-XS (Old)
 and      /work/SRC/openSUSE:Factory/.perl-JSON-XS.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-JSON-XS"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-JSON-XS/perl-JSON-XS.changes        
2016-04-28 16:53:02.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-JSON-XS.new/perl-JSON-XS.changes   
2016-11-18 22:02:56.000000000 +0100
@@ -1,0 +2,15 @@
+Thu Nov 17 06:37:58 UTC 2016 - co...@suse.com
+
+- updated to 3.03
+   see /usr/share/doc/packages/perl-JSON-XS/Changes
+
+  TODO: rfc7464
+  TODO: Victor Efimov
+  
+  3.03 Wed Nov 16 20:20:59 CET 2016
+       - fix a bug introduced by a perl bug workaround that would cause
+            incremental parsing to fail with a sv_chop panic.
+       - json_xs: toformat failure error message fixed.
+          - json_xs: allow cyclic data structures in CBOR.
+
+-------------------------------------------------------------------

Old:
----
  JSON-XS-3.02.tar.gz

New:
----
  JSON-XS-3.03.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-JSON-XS.spec ++++++
--- /var/tmp/diff_new_pack.A7o56n/_old  2016-11-18 22:02:57.000000000 +0100
+++ /var/tmp/diff_new_pack.A7o56n/_new  2016-11-18 22:02:57.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           perl-JSON-XS
-Version:        3.02
+Version:        3.03
 Release:        0
 #Upstream: CHECK(GPL-1.0+ or Artistic-1.0)
 %define cpan_name JSON-XS

++++++ JSON-XS-3.02.tar.gz -> JSON-XS-3.03.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-XS-3.02/Changes new/JSON-XS-3.03/Changes
--- old/JSON-XS-3.02/Changes    2016-02-26 22:46:02.000000000 +0100
+++ new/JSON-XS-3.03/Changes    2016-11-16 20:21:23.000000000 +0100
@@ -5,6 +5,14 @@
 TODO: http://stevehanov.ca/blog/index.php?id=104 compression
 TODO: how to cope with tagged values and standard json decoders
 TODO: investigate magic (Eric Brine)
+TODO: rfc7464
+TODO: Victor Efimov
+
+3.03 Wed Nov 16 20:20:59 CET 2016
+       - fix a bug introduced by a perl bug workaround that would cause
+          incremental parsing to fail with a sv_chop panic.
+       - json_xs: toformat failure error message fixed.
+        - json_xs: allow cyclic data structures in CBOR.
 
 3.02 Fri Feb 26 22:45:20 CET 2016
        - allow_nonref now affects booleans (\1, $Types::Serialiser::Boolean)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-XS-3.02/META.json new/JSON-XS-3.03/META.json
--- old/JSON-XS-3.02/META.json  2016-02-26 22:46:28.000000000 +0100
+++ new/JSON-XS-3.03/META.json  2016-11-16 20:21:42.000000000 +0100
@@ -39,5 +39,5 @@
       }
    },
    "release_status" : "stable",
-   "version" : 3.02
+   "version" : 3.03
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-XS-3.02/META.yml new/JSON-XS-3.03/META.yml
--- old/JSON-XS-3.02/META.yml   2016-02-26 22:46:28.000000000 +0100
+++ new/JSON-XS-3.03/META.yml   2016-11-16 20:21:42.000000000 +0100
@@ -21,4 +21,4 @@
 requires:
   Types::Serialiser: '0'
   common::sense: '0'
-version: 3.02
+version: 3.03
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-XS-3.02/README new/JSON-XS-3.03/README
--- old/JSON-XS-3.02/README     2016-02-26 22:46:28.000000000 +0100
+++ new/JSON-XS-3.03/README     2016-11-16 20:21:43.000000000 +0100
@@ -678,10 +678,10 @@
 
         And finally, in list context, it will try to extract as many objects
         from the stream as it can find and return them, or the empty list
-        otherwise. For this to work, there must be no separators between the
-        JSON objects or arrays, instead they must be concatenated
-        back-to-back. If an error occurs, an exception will be raised as in
-        the scalar context case. Note that in this case, any
+        otherwise. For this to work, there must be no separators (other than
+        whitespace) between the JSON objects or arrays, instead they must be
+        concatenated back-to-back. If an error occurs, an exception will be
+        raised as in the scalar context case. Note that in this case, any
         previously-parsed JSON texts will be lost.
 
         Example: Parse some JSON arrays/objects in a given string and return
@@ -699,6 +699,10 @@
         exception, you can also call this method before having parsed
         anything.
 
+        That means you can only use this function to look at or manipulate
+        text before or after complete JSON objects, not while the parser is
+        in the middle of parsing a JSON object.
+
         This function is useful in two cases: a) finding the trailing text
         after a JSON object or b) parsing multiple JSON objects separated by
         non-JSON text (such as commas).
@@ -1483,7 +1487,7 @@
 INTEROPERABILITY WITH OTHER MODULES
     "JSON::XS" uses the Types::Serialiser module to provide boolean
     constants. That means that the JSON true and false values will be
-    comaptible to true and false values of iother modules that do the same,
+    comaptible to true and false values of other modules that do the same,
     such as JSON::PP and CBOR::XS.
 
 INTEROPERABILITY WITH OTHER JSON DECODERS
@@ -1507,7 +1511,7 @@
     invalid) JSON syntax for serialised objects, and you still want to
     decode the generated When you want to serialise objects, you can run a
     regex to replace the tagged syntax by standard JSON arrays (it only
-    works for "normal" packagesnames without comma, newlines or single
+    works for "normal" package names without comma, newlines or single
     colons). First, the readable Perl version:
 
        # if your FREEZE methods return no values, you need this replace first:
@@ -1551,14 +1555,14 @@
     both the original JSON specification on www.json.org and RFC4627.
 
     As far as I can see, you can get partial compatibility when parsing by
-    using "->allow_nonref". However, consider thew security implications of
+    using "->allow_nonref". However, consider the security implications of
     doing so.
 
     I haven't decided yet when to break compatibility with RFC4627 by
     default (and potentially leave applications insecure) and change the
     default to follow RFC7159, but application authors are well advised to
     call "->allow_nonref(0)" even if this is the current default, if they
-    cannot handle non-reference values, in preparation for the day when the4
+    cannot handle non-reference values, in preparation for the day when the
     default will change.
 
 THREADS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-XS-3.02/XS.pm new/JSON-XS-3.03/XS.pm
--- old/JSON-XS-3.02/XS.pm      2016-02-26 22:46:21.000000000 +0100
+++ new/JSON-XS-3.03/XS.pm      2016-11-16 20:21:40.000000000 +0100
@@ -103,7 +103,7 @@
 
 use common::sense;
 
-our $VERSION = 3.02;
+our $VERSION = 3.03;
 our @ISA = qw(Exporter);
 
 our @EXPORT = qw(encode_json decode_json);
@@ -750,11 +750,11 @@
 
 And finally, in list context, it will try to extract as many objects
 from the stream as it can find and return them, or the empty list
-otherwise. For this to work, there must be no separators between the JSON
-objects or arrays, instead they must be concatenated back-to-back. If
-an error occurs, an exception will be raised as in the scalar context
-case. Note that in this case, any previously-parsed JSON texts will be
-lost.
+otherwise. For this to work, there must be no separators (other than
+whitespace) between the JSON objects or arrays, instead they must be
+concatenated back-to-back. If an error occurs, an exception will be
+raised as in the scalar context case. Note that in this case, any
+previously-parsed JSON texts will be lost.
 
 Example: Parse some JSON arrays/objects in a given string and return
 them.
@@ -771,6 +771,10 @@
 real world conditions). As a special exception, you can also call this
 method before having parsed anything.
 
+That means you can only use this function to look at or manipulate text
+before or after complete JSON objects, not while the parser is in the
+middle of parsing a JSON object.
+
 This function is useful in two cases: a) finding the trailing text after a
 JSON object or b) parsing multiple JSON objects separated by non-JSON text
 (such as commas).
@@ -1610,7 +1614,7 @@
 
 C<JSON::XS> uses the L<Types::Serialiser> module to provide boolean
 constants. That means that the JSON true and false values will be
-comaptible to true and false values of iother modules that do the same,
+comaptible to true and false values of other modules that do the same,
 such as L<JSON::PP> and L<CBOR::XS>.
 
 
@@ -1637,7 +1641,7 @@
 invalid) JSON syntax for serialised objects, and you still want to decode
 the generated When you want to serialise objects, you can run a regex
 to replace the tagged syntax by standard JSON arrays (it only works for
-"normal" packagesnames without comma, newlines or single colons). First,
+"normal" package names without comma, newlines or single colons). First,
 the readable Perl version:
 
    # if your FREEZE methods return no values, you need this replace first:
@@ -1683,14 +1687,14 @@
 original JSON specification on www.json.org and RFC4627.
 
 As far as I can see, you can get partial compatibility when parsing by
-using C<< ->allow_nonref >>. However, consider thew security implications
+using C<< ->allow_nonref >>. However, consider the security implications
 of doing so.
 
 I haven't decided yet when to break compatibility with RFC4627 by default
 (and potentially leave applications insecure) and change the default to
 follow RFC7159, but application authors are well advised to call C<<
 ->allow_nonref(0) >> even if this is the current default, if they cannot
-handle non-reference values, in preparation for the day when the4 default
+handle non-reference values, in preparation for the day when the default
 will change.
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-XS-3.02/XS.xs new/JSON-XS-3.03/XS.xs
--- old/JSON-XS-3.02/XS.xs      2016-02-26 22:41:10.000000000 +0100
+++ new/JSON-XS-3.03/XS.xs      2016-11-16 20:16:28.000000000 +0100
@@ -320,7 +320,6 @@
           return 1;
         else if (*pv == '0')
           return 0;
-
     }
 
   return -1;
@@ -335,11 +334,14 @@
 
   scalar = SvRV (scalar);
 
-  if (SvSTASH (scalar) == bool_stash)
-    return 1;
+  if (SvTYPE (scalar) >= SVt_PVMG)
+    {
+      if (SvSTASH (scalar) == bool_stash)
+        return 1;
 
-  if (!SvOBJECT (scalar) && ref_bool_type (scalar) >= 0)
-    return 1;
+      if (!SvOBJECT (scalar) && ref_bool_type (scalar) >= 0)
+        return 1;
+    }
 
   return 0;
 }
@@ -1689,7 +1691,7 @@
 }
 
 static SV *
-decode_json (SV *string, JSON *json, char **offset_return)
+decode_json (SV *string, JSON *json, STRLEN *offset_return)
 {
   dec_t dec;
   SV *sv;
@@ -1752,9 +1754,8 @@
   sv = decode_sv (&dec);
 
   if (offset_return)
-    *offset_return = dec.cur;
-
-  if (!(offset_return || !sv))
+    *offset_return = dec.cur - SvPVX (string);
+  else if (sv)
     {
       // check for trailing garbage
       decode_ws (&dec);
@@ -2111,11 +2112,11 @@
        PPCODE:
 {
        SV *sv;
-        char *offset;
+        STRLEN offset;
         PUTBACK; sv = decode_json (jsonstr, self, &offset); SPAGAIN;
         EXTEND (SP, 2);
         PUSHs (sv);
-        PUSHs (sv_2mortal (newSVuv (ptr_to_index (jsonstr, offset))));
+        PUSHs (sv_2mortal (newSVuv (ptr_to_index (jsonstr, SvPV_nolen 
(jsonstr) + offset))));
 }
 
 void incr_parse (JSON *self, SV *jsonstr = 0)
@@ -2172,7 +2173,7 @@
           do
             {
               SV *sv;
-              char *offset;
+              STRLEN offset;
 
               if (!INCR_DONE (self))
                 {
@@ -2198,11 +2199,11 @@
               PUTBACK; sv = decode_json (self->incr_text, self, &offset); 
SPAGAIN;
               XPUSHs (sv);
 
-              self->incr_pos -= offset - SvPVX (self->incr_text);
+              self->incr_pos -= offset;
               self->incr_nest = 0;
               self->incr_mode = 0;
 
-              sv_chop (self->incr_text, offset);
+              sv_chop (self->incr_text, SvPVX (self->incr_text) + offset);
             }
           while (GIMME_V == G_ARRAY);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-XS-3.02/bin/json_xs new/JSON-XS-3.03/bin/json_xs
--- old/JSON-XS-3.02/bin/json_xs        2016-02-21 16:37:44.000000000 +0100
+++ new/JSON-XS-3.03/bin/json_xs        2016-09-23 09:44:48.000000000 +0200
@@ -52,8 +52,6 @@
 
 =item none - nothing is read, creates an C<undef> scalar - mainly useful with 
C<-e>
 
-=item cbor - CBOR (via CBOR::XS)
-
 =back
 
 =item -t toformat
@@ -179,13 +177,12 @@
       warn "input text encoding is $enc\n" if $opt_verbose;
       JSON::XS->new->decode (decode $enc, $_)
    },
-   "cbor"          => sub { require CBOR::XS; CBOR::XS::decode_cbor ($_) },
+   "cbor"          => sub { require CBOR::XS; 
CBOR::XS->new->allow_cycles->decode ($_) },
    "storable"      => sub { Storable::thaw $_ },
    "storable-file" => sub { open my $fh, "<", \$_; Storable::fd_retrieve $fh },
    "bencode"       => sub { require Convert::Bencode; 
Convert::Bencode::bdecode ($_) },
    "clzf"          => sub { require Compress::LZF; Compress::LZF::sthaw ($_) },
    "yaml"          => sub { require YAML; YAML::Load ($_) },
-   "cbor"          => sub { require CBOR::XS; CBOR::XS::decode_cbor ($_) },
    "eval"          => sub { my $v = eval "no strict; no warnings; no 
utf8;\n#line 1 \"input\"\n$_"; die "$@" if $@; $v },
 );
 
@@ -226,7 +223,7 @@
    or die "$opt_from: not a valid fromformat\n";
 
 $T{$opt_to}
-   or die "$opt_from: not a valid toformat\n";
+   or die "$opt_to: not a valid toformat\n";
 
 if ($opt_from ne "none") {
    local $/;


Reply via email to