From: gregor herrmann Date: Tue, 13 May 2014 20:05:51 +0000 (+0200) Subject: Imported Upstream version 2.12 X-Git-Tag: archive/raspbian/4.017+ds-1+rpi1~1^2~3^2~27 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d1f344b5951904274b7479e5c692158a010a4871;p=libsereal-encoder-perl.git Imported Upstream version 2.12 --- diff --git a/Changes b/Changes index a12f34b..5b08b97 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,9 @@ Revision history for Perl extension Sereal-Encoder * of the decoder before upgrading to version 2 of the * encoder! +2.12 Sun May 11 23:30 + - Synchronization release with Decoder changes. + 2.11 Sun Apr 13 23:04 - Work around regression in Perl 5.16.3 - 5.17.0 As of 8ae39f603f0f5778c160e18e08df60 while each diff --git a/MANIFEST b/MANIFEST index 1d71f27..2bc7c2e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,5 @@ author_tools/bench.pl +author_tools/different_sereal_docs.sh author_tools/freeze_thaw_timing.pl author_tools/hobodecoder.pl author_tools/numeric_str_length.c diff --git a/META.json b/META.json index 60d1bba..01eb7b9 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "Steffen Mueller , Yves Orton " ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921", + "generated_by" : "ExtUtils::MakeMaker version 6.9, CPAN::Meta::Converter version 2.120351", "license" : [ "perl_5" ], @@ -55,5 +55,5 @@ "url" : "git://github.com/Sereal/Sereal.git" } }, - "version" : "2.11" + "version" : "2.12" } diff --git a/META.yml b/META.yml index c437730..0847488 100644 --- a/META.yml +++ b/META.yml @@ -16,7 +16,7 @@ build_requires: configure_requires: ExtUtils::MakeMaker: 0 dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921' +generated_by: 'ExtUtils::MakeMaker version 6.9, CPAN::Meta::Converter version 2.120351' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -32,4 +32,4 @@ requires: resources: bugtracker: https://github.com/Sereal/Sereal/issues repository: git://github.com/Sereal/Sereal.git -version: 2.11 +version: 2.12 diff --git a/author_tools/different_sereal_docs.sh b/author_tools/different_sereal_docs.sh new file mode 100755 index 0000000..70c2412 --- /dev/null +++ b/author_tools/different_sereal_docs.sh @@ -0,0 +1,38 @@ +#!/bin/sh -e + +# This emits all possible types of Sereal docs, for testing the patch +# to file(1) to detect the various types + +rm -v /tmp/sereal-*.srl + +perl -MSereal::Encoder=encode_sereal -we 'print encode_sereal("foo" x 8, {use_protocol_v1 => 1})' >/tmp/sereal-v1-plain.srl +hexdump -C /tmp/sereal-v1-plain.srl +sha1sum /tmp/sereal-v1-plain.srl +echo + +perl -MSereal::Encoder=encode_sereal -we 'print encode_sereal("foo" x 8, {})' >/tmp/sereal-v2-plain.srl +hexdump -C /tmp/sereal-v2-plain.srl +sha1sum /tmp/sereal-v2-plain.srl +echo + +perl -MSereal::Encoder=encode_sereal -we 'print encode_sereal("foo" x 8, {use_protocol_v1 => 1, snappy => 1, snappy_incr => 0, snappy_threshold => 0})' >/tmp/sereal-v1-snappy-nonincr.srl +hexdump -C /tmp/sereal-v1-snappy-nonincr.srl +sha1sum /tmp/sereal-v1-snappy-nonincr.srl +echo + +perl -MSereal::Encoder=encode_sereal -we 'print encode_sereal("foo" x 8, {use_protocol_v1 => 1, snappy => 0, snappy_incr => 1, snappy_threshold => 0})' >/tmp/sereal-v1-snappy-incr.srl +hexdump -C /tmp/sereal-v1-snappy-incr.srl +sha1sum /tmp/sereal-v1-snappy-incr.srl +echo + +# The non-incremental option doesn't do anything under v2 +perl -MSereal::Encoder=encode_sereal -we 'print encode_sereal("foo" x 8, {use_protocol_v1 => 0, snappy => 1, snappy_incr => 0, snappy_threshold => 0})' >/tmp/sereal-v2-snappy-nonincr.srl +hexdump -C /tmp/sereal-v2-snappy-nonincr.srl +sha1sum /tmp/sereal-v2-snappy-nonincr.srl +echo + +perl -MSereal::Encoder=encode_sereal -we 'print encode_sereal("foo" x 8, {use_protocol_v1 => 0, snappy => 0, snappy_incr => 1, snappy_threshold => 0})' >/tmp/sereal-v2-snappy-incr.srl +hexdump -C /tmp/sereal-v2-snappy-incr.srl +sha1sum /tmp/sereal-v2-snappy-incr.srl +echo + diff --git a/const-c.inc b/const-c.inc index 7965ac4..df00f43 100644 --- a/const-c.inc +++ b/const-c.inc @@ -673,7 +673,7 @@ constant (pTHX_ const char *name, STRLEN len, IV *iv_return) { Regenerate these constant functions by feeding this entire source file to perl -x -#!/home/yorton/perl5/perlbrew/perls/perl-5.18.2/bin/perl -w +#!/usr/bin/perl -w use ExtUtils::Constant qw (constant_types C_constant XS_constant); my $types = {map {($_, 1)} qw(IV)}; diff --git a/lib/Sereal/Encoder.pm b/lib/Sereal/Encoder.pm index 26157c6..6a57c50 100644 --- a/lib/Sereal/Encoder.pm +++ b/lib/Sereal/Encoder.pm @@ -5,7 +5,7 @@ use warnings; use Carp qw/croak/; use XSLoader; -our $VERSION = '2.11'; # Don't forget to update the TestCompat set for testing against installed decoders! +our $VERSION = '2.12'; # 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. @@ -435,7 +435,7 @@ Sereal represents a reference to an array as a sequence of tags which, in its simplest form, reads I. The separation of "REF" and "ARRAY" is necessary to properly implement all of Perl's referencing and aliasing semantics correctly. Quite frequently, however, -your array is only reference once and plainly so. If it's also at most 15 elements +your array is only referenced once and plainly so. If it's also at most 15 elements long, Sereal optimizes all of the "REF" and "ARRAY" tags, as well as the length into a special one byte ARRAYREF tag. This is a very significant optimization for common cases. This, however, does mean that most arrays up to 15 elements