Hello community,

here is the log from the commit of package perl-Cpanel-JSON-XS for 
openSUSE:Factory checked in at 2017-03-28 15:22:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Cpanel-JSON-XS (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Cpanel-JSON-XS.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Cpanel-JSON-XS"

Tue Mar 28 15:22:17 2017 rev:4 rq:482151 version:3.0230

Changes:
--------
Binary files 
/work/SRC/openSUSE:Factory/perl-Cpanel-JSON-XS/perl-Cpanel-JSON-XS.changes and 
/work/SRC/openSUSE:Factory/.perl-Cpanel-JSON-XS.new/perl-Cpanel-JSON-XS.changes 
differ

Old:
----
  Cpanel-JSON-XS-3.0226.tar.gz

New:
----
  Cpanel-JSON-XS-3.0230.tar.gz

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

Other differences:
------------------
++++++ perl-Cpanel-JSON-XS.spec ++++++
--- /var/tmp/diff_new_pack.oUS9ns/_old  2017-03-28 15:22:32.178896854 +0200
+++ /var/tmp/diff_new_pack.oUS9ns/_new  2017-03-28 15:22:32.178896854 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Cpanel-JSON-XS
-Version:        3.0226
+Version:        3.0230
 Release:        0
 %define cpan_name Cpanel-JSON-XS
 Summary:        Cpanel Fork of Json::Xs, Fast and Correct Serializing

++++++ Cpanel-JSON-XS-3.0226.tar.gz -> Cpanel-JSON-XS-3.0230.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-3.0226/.travis.yml 
new/Cpanel-JSON-XS-3.0230/.travis.yml
--- old/Cpanel-JSON-XS-3.0226/.travis.yml       2016-10-30 13:27:46.000000000 
+0100
+++ new/Cpanel-JSON-XS-3.0230/.travis.yml       2017-03-10 15:06:22.000000000 
+0100
@@ -16,7 +16,7 @@
   - "5.24-thr-dbg"
   - "5.24-mb"
   - "dev"
-  - "blead"
+#  - "blead"
 
 # slows down already cached versions by 3 (33s => 1m45s)
 # (i.e. cache download: 9s, setup: 45s-130s)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-3.0226/Changes 
new/Cpanel-JSON-XS-3.0230/Changes
--- old/Cpanel-JSON-XS-3.0226/Changes   2017-02-11 14:23:05.000000000 +0100
+++ new/Cpanel-JSON-XS-3.0230/Changes   2017-03-12 10:49:43.000000000 +0100
@@ -2,10 +2,26 @@
 
 TODO: http://stevehanov.ca/blog/index.php?id=104 compression
 
+3.0230 2017-03-12 (rurban)
+        - Relax -Werror=declaration-after-statement for older gcc < 4.2
+
+3.0229 2017-03-10 (rurban)
+        - fix minor gcc compilation warnings.
+        - Add some core compat. warnings for gcc/clang compat. compilers.
+
+3.0228 2017-03-08 (rurban)
+        - fix decode_prefix offset when the string was re-allocated.
+        rather return the offset not the pointer to the old start. (#82 
PaulGWebster)
+
+3.0227 2017-02-13 (rurban)
+        - fix CLONE and END, broken with 3.0226 (#80 y).
+          These methods are usually called with arguments, which we ignore.
+
 3.0226 2017-02-11 (rurban)
         - relax longdouble Gconvert test on ppc64le and aarch64-linux-ld,
         with apparent HW quadmath without USE_QUADMATH (older perls).
         (detected by dgolden)
+        - Fixed 2 uninit warnings in the XS
 
 3.0225 2016-11-23 (rurban)
         - decode utf8 security fixes for perl 5.6.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-3.0226/META.json 
new/Cpanel-JSON-XS-3.0230/META.json
--- old/Cpanel-JSON-XS-3.0226/META.json 2017-02-11 14:23:28.000000000 +0100
+++ new/Cpanel-JSON-XS-3.0230/META.json 2017-03-12 10:50:59.000000000 +0100
@@ -4,7 +4,7 @@
       "Reini Urban <[email protected]>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter 
version 2.150010",
+   "generated_by" : "ExtUtils::MakeMaker version 8.0404, CPAN::Meta::Converter 
version 2.150010",
    "license" : [
       "perl_5"
    ],
@@ -49,6 +49,6 @@
          "url" : "https://github.com/rurban/Cpanel-JSON-XS";
       }
    },
-   "version" : "3.0226",
-   "x_serialization_backend" : "JSON::PP version 2.27300_01"
+   "version" : "3.0230",
+   "x_serialization_backend" : "JSON::PP version 2.27400_02"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-3.0226/META.yml 
new/Cpanel-JSON-XS-3.0230/META.yml
--- old/Cpanel-JSON-XS-3.0226/META.yml  2017-02-11 14:23:28.000000000 +0100
+++ new/Cpanel-JSON-XS-3.0230/META.yml  2017-03-12 10:50:59.000000000 +0100
@@ -7,7 +7,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 
2.150010'
+generated_by: 'ExtUtils::MakeMaker version 8.0404, CPAN::Meta::Converter 
version 2.150010'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -24,5 +24,5 @@
   homepage: http://software.schmorp.de/pkg/JSON-XS.html
   license: http://dev.perl.org/licenses/
   repository: https://github.com/rurban/Cpanel-JSON-XS
-version: '3.0226'
+version: '3.0230'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-3.0226/Makefile.PL 
new/Cpanel-JSON-XS-3.0230/Makefile.PL
--- old/Cpanel-JSON-XS-3.0226/Makefile.PL       2016-04-13 12:24:43.000000000 
+0200
+++ new/Cpanel-JSON-XS-3.0230/Makefile.PL       2017-03-12 10:50:48.000000000 
+0100
@@ -1,6 +1,14 @@
 use 5.006002;
 use ExtUtils::MakeMaker;
-use Config ();
+use Config;
+
+my $define = '';
+# https://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/Warning-Options.html
+if ($Config{gccversion} and $Config{gccversion} =~ /^(\d+\.\d+)\./) {
+    my $gccver = $1;
+    $define = '-Wall -Werror=declaration-after-statement -Wextra -W'
+      if $gccver >= 4.2;
+}
 
 WriteMakefile(
   dist  => {
@@ -14,7 +22,8 @@
   PREREQ_PM    => {
     'Pod::Text'     => '2.08',
   },
-  LICENSE  => 'perl',
+  DEFINE       => $define,
+  LICENSE      => 'perl',
   ($] >= 5.005 ?
    (ABSTRACT_FROM  => 'XS.pm',
     AUTHOR         => 'Reini Urban <[email protected]>',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-3.0226/README 
new/Cpanel-JSON-XS-3.0230/README
--- old/Cpanel-JSON-XS-3.0226/README    2017-02-11 14:23:32.000000000 +0100
+++ new/Cpanel-JSON-XS-3.0230/README    2017-03-12 10:51:00.000000000 +0100
@@ -1983,8 +1983,8 @@
 AUTHOR
     Marc Lehmann <[email protected]>, http://home.schmorp.de/
 
-    Reini Urban <[email protected]>, http://cpanel.net/
+    Reini Urban <[email protected]>, http://cpanel.net/
 
 MAINTAINER
-    Reini Urban <[email protected]>
+    Reini Urban <[email protected]>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-3.0226/SIGNATURE 
new/Cpanel-JSON-XS-3.0230/SIGNATURE
--- old/Cpanel-JSON-XS-3.0226/SIGNATURE 2017-02-11 14:23:32.000000000 +0100
+++ new/Cpanel-JSON-XS-3.0230/SIGNATURE 2017-03-12 10:51:00.000000000 +0100
@@ -14,16 +14,16 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 7473e2b9cd191810a0531dcd0bed55a153acc497 .travis.yml
+SHA1 bddff1b119b111563d9c812b92e28289c3ea450e .travis.yml
 SHA1 9a56f3b919dfc8fced3803e165a2e38de62646e5 COPYING
-SHA1 e98436c286eb20f511fc2709e87315b1d2c7a389 Changes
+SHA1 6a735adb2ae447c8d3fea54a42ebdf02e8e676c1 Changes
 SHA1 7ebf5876b2d33d6ddcfd69e2541394c63537fcfd MANIFEST
-SHA1 8661e1a8b6e3c9163e214d2a9b877897d4d4f095 META.json
-SHA1 4632ecec30eef7f5efad1129719a20393be4f243 META.yml
-SHA1 326673d83f68b486d22267c540f457f55cd91c76 Makefile.PL
-SHA1 c14d9febccd6bdcb718cae6a307b9c7a0cb4dfea README
-SHA1 97ed6d927bab64972ff0732acb479ce36d92870a XS.pm
-SHA1 fb6b38d7290d6850df663b6fa58e306cab5cea0f XS.xs
+SHA1 2d2c80631cd5122bd003ea0747317750994e7b76 META.json
+SHA1 c61d45775e3be8b7016317e6da3e83a9edee1637 META.yml
+SHA1 33730f0ee35aa0104e84fa8ca8ae90e6ccd9a48c Makefile.PL
+SHA1 5f9c081e4f784fbfccc7df27bf386da13f3b6301 README
+SHA1 1c5fbaa4de8028f714e76c0434af5a9010cb960c XS.pm
+SHA1 8a3f3edb3d37a7b96b06cbbcdefc33bdc45eb959 XS.xs
 SHA1 27b0bc7e0cd6fe90876fb3d285065c6a07cca028 XS/Boolean.pm
 SHA1 9e4b04d1af085e6959aaed51734475d350136392 bin/cpanel_json_xs
 SHA1 ea72bbe602baaabdd0004ef1d7e7cc3334b42bb4 eg/bench
@@ -49,7 +49,7 @@
 SHA1 cb666101c085d398374238e991624e703220c39b t/110_bignum.t
 SHA1 b007b686bb590e5eed3976edc78310437ae169d4 t/112_upgrade.t
 SHA1 01a0a0644343059c7185cb0b3b00b869d5211e1d t/113_overloaded_eq.t
-SHA1 bcd500ccfc0cfb65c3ce4a4fa101ce8f72b5450d t/114_decode_prefix.t
+SHA1 8dece990d5b07df0ae1b6364caefced774cb587d t/114_decode_prefix.t
 SHA1 eb050780996f1e428c87bf6375415ca4c863cbb2 t/115_tie_ixhash.t
 SHA1 3477b0490b8666e451ac15df97f9f35d72c946b1 t/116_incr_parse_fixed.t
 SHA1 563cf24c85f22a077a9c20a0dfee1052db289b66 t/117_numbers.t
@@ -430,7 +430,7 @@
 SHA1 e93c9b53438be114c25aa426742e24f4343057a7 typemap
 -----BEGIN PGP SIGNATURE-----
 
-iF0EARECAB0WIQRZHhhUcL58V8z0UW2abZJij/3JQgUCWJ8QUQAKCRCabZJij/3J
-QnDZAJ9BAp0fJAFNSqsxl7D9P5n84tibJACdFteZmttuiWfmBjVxmIk4pwr2KO4=
-=WQmM
+iF0EARECAB0WIQRZHhhUcL58V8z0UW2abZJij/3JQgUCWMUaBAAKCRCabZJij/3J
+QkuVAJkBzJ/sKatQVRX2xw87kuVD+9YDWwCdEjShJOLSAd2+4kRv469YBo9bVLc=
+=HEXK
 -----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-3.0226/XS.pm 
new/Cpanel-JSON-XS-3.0230/XS.pm
--- old/Cpanel-JSON-XS-3.0226/XS.pm     2017-02-11 14:23:05.000000000 +0100
+++ new/Cpanel-JSON-XS-3.0230/XS.pm     2017-03-12 10:25:48.000000000 +0100
@@ -1,5 +1,5 @@
 package Cpanel::JSON::XS;
-our $VERSION = '3.0226';
+our $VERSION = '3.0230';
 our $XS_VERSION = $VERSION;
 $VERSION = eval $VERSION;
 
@@ -2227,11 +2227,11 @@
 
 Marc Lehmann <[email protected]>, http://home.schmorp.de/
 
-Reini Urban <[email protected]>, http://cpanel.net/
+Reini Urban <[email protected]>, http://cpanel.net/
 
 =head1 MAINTAINER
 
-Reini Urban <[email protected]>
+Reini Urban <[email protected]>
 
 =cut
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-3.0226/XS.xs 
new/Cpanel-JSON-XS-3.0230/XS.xs
--- old/Cpanel-JSON-XS-3.0226/XS.xs     2017-01-21 15:42:57.000000000 +0100
+++ new/Cpanel-JSON-XS-3.0230/XS.xs     2017-03-10 15:06:22.000000000 +0100
@@ -474,13 +474,13 @@
   return s;
 }
 
-/* convert offset pointer to character index, sv must be string */
+/* convert offset to character index, sv must be string */
 static STRLEN
-ptr_to_index (pTHX_ SV *sv, const U8 *offset)
+ptr_to_index (pTHX_ SV *sv, const STRLEN offset)
 {
   return SvUTF8 (sv)
-         ? utf8_distance ((U8*)offset, (U8*)SvPVX (sv))
-         : offset - (U8*)SvPVX (sv);
+    ? (STRLEN)utf8_distance ((U8*)(SvPVX(sv)+offset), (U8*)SvPVX (sv))
+    : offset;
 }
 
 /*/////////////////////////////////////////////////////////////////////////// 
*/
@@ -3068,7 +3068,7 @@
 }
 
 static SV *
-decode_json (pTHX_ SV *string, JSON *json, U8 **offset_return)
+decode_json (pTHX_ SV *string, JSON *json, STRLEN *offset_return)
 {
   dec_t dec;
   SV *sv;
@@ -3080,6 +3080,7 @@
    * makes perl ignore the magic in subsequent accesses.
    * also make a copy of non-PV values, to get them into a clean
    * state (SvPV should do that, but it's buggy, see below).
+   * But breaks decode_prefix with offset.
    */
   /*SvGETMAGIC (string);*/
   if (SvMAGICAL (string) || !SvPOK (string) || SvIsCOW_shared_hash(string))
@@ -3175,8 +3176,12 @@
   decode_ws (&dec);
   sv = decode_sv (aTHX_ &dec);
 
-  if (offset_return)
-    *offset_return = (U8*)dec.cur;
+  if (offset_return) {
+    if (dec.cur < SvPVX (string) || dec.cur > SvEND (string))
+      *offset_return = 0;
+    else
+      *offset_return = dec.cur - SvPVX (string);
+  }
 
   if (!(offset_return || !sv))
     {
@@ -3213,7 +3218,7 @@
 #endif
       croak ("%s, at character offset %d (before \"%s\")",
              dec.err,
-             (int)ptr_to_index (aTHX_ string, (U8*)dec.cur),
+             (int)ptr_to_index (aTHX_ string, dec.cur-SvPVX(string)),
              dec.cur != dec.end ? SvPV_nolen (uni) : "(end of string)");
     }
 
@@ -3406,7 +3411,7 @@
 
 #ifdef USE_ITHREADS
 
-void CLONE ()
+void CLONE (...)
     PPCODE:
 {
         MY_CXT_CLONE; /* possible declaration */
@@ -3416,7 +3421,7 @@
 
 #endif
 
-void END()
+void END(...)
     PREINIT:
         dMY_CXT;
         SV * sv;
@@ -3587,7 +3592,7 @@
     PPCODE:
 {
        SV *sv;
-        U8 *offset;
+        STRLEN offset;
         PUTBACK; sv = decode_json (aTHX_ jsonstr, self, &offset); SPAGAIN;
         EXTEND (SP, 2);
         PUSHs (sv);
@@ -3650,7 +3655,8 @@
           do
             {
               SV *sv;
-              U8 *offset;
+              STRLEN offset;
+              char *endp;
 
               if (!INCR_DONE (self))
                 {
@@ -3676,13 +3682,14 @@
               PUTBACK; sv = decode_json (aTHX_ self->incr_text, self, 
&offset); SPAGAIN;
               XPUSHs (sv);
 
-              self->incr_pos -= offset - (U8*)SvPVX (self->incr_text);
+              endp = SvPVX(self->incr_text) + offset;
+              self->incr_pos -= offset;
               self->incr_nest = 0;
               self->incr_mode = 0;
 #if PERL_VERSION > 9
-              sv_chop (self->incr_text, (const char* const)offset);
+              sv_chop (self->incr_text, (const char* const)endp);
 #else
-              sv_chop (self->incr_text, (char*)offset);
+              sv_chop (self->incr_text, (char*)endp);
 #endif
             }
           while (GIMME_V == G_ARRAY);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-3.0226/t/114_decode_prefix.t 
new/Cpanel-JSON-XS-3.0230/t/114_decode_prefix.t
--- old/Cpanel-JSON-XS-3.0226/t/114_decode_prefix.t     2015-11-30 
17:17:08.000000000 +0100
+++ new/Cpanel-JSON-XS-3.0230/t/114_decode_prefix.t     2017-03-10 
14:00:51.000000000 +0100
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 
 use strict;
-use Test::More tests => 8;
+use Test::More tests => 12;
 
 use Cpanel::JSON::XS;
 
@@ -23,3 +23,9 @@
 eval { $json->decode_prefix( "\n" ) }; ok( $@ =~ /malformed JSON/ );
 eval { $json->decode_prefix('null') }; ok $@ =~ /allow_nonref/;
 
+my $buffer = "[0][1][2][3]";
+for (0..3) {
+  my ($data, $size) = $json->decode_prefix($buffer);
+  $buffer = substr($buffer,$size);
+  is ($size, 3, "advance offset $buffer #82");
+}


Reply via email to