New upstream version 4.012+ds
authorgregor herrmann <gregoa@debian.org>
Thu, 11 Jun 2020 16:09:12 +0000 (18:09 +0200)
committergregor herrmann <gregoa@debian.org>
Thu, 11 Jun 2020 16:09:12 +0000 (18:09 +0200)
Changes
META.json
META.yml
lib/Sereal/Encoder.pm
lib/Sereal/Encoder/Constants.pm

diff --git a/Changes b/Changes
index fbb7e6183af48696bf6b8e5f1b22c959ec080a1a..fc45fb5b12ea4247f335daa013dc41724039e9c4 100644 (file)
--- a/Changes
+++ b/Changes
@@ -5,6 +5,10 @@ Revision history for Perl extension Sereal-Encoder
 *          of the decoder before upgrading to version 4 of the *
 *          encoder!                                            *
 ****************************************************************
+4.012 Weds June 10, 2020
+    * Fix memory leak, thanks to Kirill Sysoev
+    * Fix memory leak in looks_like_sereal(), thanks to Kirill Sysoev
+
 4.011 Tues February 4, 2020
     * Fix and test custom opcode logic for 5.31.2 and later.
 
index 4d19be8067b5f5e270d3d9657308d1cc9442014c..e8ca8039d25cc4b40821b1bd13e901643fd90182 100644 (file)
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
       "Steffen Mueller <smueller@cpan.org>, Yves Orton <yves@cpan.org>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010",
+   "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010",
    "license" : [
       "perl_5"
    ],
@@ -62,6 +62,6 @@
          "url" : "git://github.com/Sereal/Sereal.git"
       }
    },
-   "version" : "4.011",
-   "x_serialization_backend" : "JSON::PP version 4.04"
+   "version" : "4.012",
+   "x_serialization_backend" : "JSON::PP version 4.02"
 }
index aa3b2d7a9db89c89427be3587dbdc00969470d4f..5bd409e1261a8de0753134e7cab93a810966bd45 100644 (file)
--- a/META.yml
+++ b/META.yml
@@ -18,7 +18,7 @@ build_requires:
 configure_requires:
   ExtUtils::MakeMaker: '7.0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -34,5 +34,5 @@ requires:
 resources:
   bugtracker: https://github.com/Sereal/Sereal/issues
   repository: git://github.com/Sereal/Sereal.git
-version: '4.011'
+version: '4.012'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
index 6e51541c054f0297b56f4ec581c731179882f45b..e6b08e0a1efae33810404826195dd3a094fe401a 100644 (file)
@@ -5,7 +5,7 @@ use warnings;
 use Carp qw/croak/;
 use XSLoader;
 
-our $VERSION= '4.011'; # Don't forget to update the TestCompat set for testing against installed decoders!
+our $VERSION= '4.012'; # Don't forget to update the TestCompat set for testing against installed decoders!
 our $XS_VERSION= $VERSION; $VERSION= eval $VERSION;
 
 # not for public consumption, just for testing.
@@ -16,14 +16,17 @@ sub _test_compat { return ( @$TestCompat, $VERSION ) }
 # Make sure to keep these constants in sync with the C code in srl_encoder.c.
 # I know they could be exported from C using things like ExtUtils::Constant,
 # but that's too much of a hassle for just three numbers.
-use constant {
+#start-no-tidy
+my ($compress_consts, $full_consts);
+BEGIN {
+$compress_consts= {
     SRL_UNCOMPRESSED => 0,
     SRL_SNAPPY       => 1,
     SRL_ZLIB         => 2,
     SRL_ZSTD         => 3,
 };
-#start-no-tidy
-use constant #begin generated
+$full_consts=
+#begin generated
 {
   'SRL_F_ALIASED_DEDUPE_STRINGS' => 4096,
   'SRL_F_CANONICAL_REFS' => 32768,
@@ -70,20 +73,28 @@ use constant #begin generated
                     'SORT_KEYS_PERL_REV',
                     'COMPRESS_ZSTD'
                   ]
-}; #end generated
+};
+#end generated
+}
+use constant $compress_consts;
+use constant $full_consts;
 #end-no-tidy
 
 use Exporter 'import';
-our @EXPORT_OK= qw(
+our @EXPORT_OK= (qw(
     encode_sereal
     encode_sereal_with_header_data
     sereal_encode_with_object
-    SRL_UNCOMPRESSED
-    SRL_SNAPPY
-    SRL_ZLIB
-    SRL_ZSTD
+), sort { $a cmp $b } 
+(
+    keys(%$compress_consts),
+    keys(%$full_consts)
+));
+our %EXPORT_TAGS= (
+    all            => \@EXPORT_OK,
+    compress_const => [ sort keys %$compress_consts ],
+    full_const     => [ sort(keys(%$compress_consts),keys(%$full_consts)) ],
 );
-our %EXPORT_TAGS= ( all => \@EXPORT_OK );
 
 # export by default if run from command line
 our @EXPORT= ( ( caller() )[1] eq '-e' ? @EXPORT_OK : () );
index 58cf8bce37c53630c5cd2bfc0dd9bf90d1978ad4..642ec86007e9ace5617a34eec22611c28ef11f76 100644 (file)
@@ -4,7 +4,7 @@ use warnings;
 require Exporter;
 our @ISA= qw(Exporter);
 
-our $VERSION= '4.011'; # Don't forget to update the TestCompat set for testing against installed encoders!
+our $VERSION= '4.012'; # Don't forget to update the TestCompat set for testing against installed encoders!
 
 our ( @EXPORT_OK, %DEFINE, %TAG_INFO_HASH, @TAG_INFO_ARRAY );