"Steffen Mueller <smueller@cpan.org>, Yves Orton <yves@cpan.org>"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 6.9, CPAN::Meta::Converter version 2.120351",
+ "generated_by" : "ExtUtils::MakeMaker version 6.9, CPAN::Meta::Converter version 2.141520",
"license" : [
"perl_5"
],
"url" : "git://github.com/Sereal/Sereal.git"
}
},
- "version" : "3.001_002"
+ "version" : "3.001_003"
}
author:
- 'Steffen Mueller <smueller@cpan.org>, Yves Orton <yves@cpan.org>'
build_requires:
- Data::Dumper: 0
- ExtUtils::ParseXS: 2.21
- File::Find: 0
- File::Path: 0
- File::Spec: 0
- Scalar::Util: 0
- Sereal::Decoder: 3.00
- Test::LongString: 0
- Test::More: 0.88
- Test::Warn: 0
+ Data::Dumper: '0'
+ ExtUtils::ParseXS: '2.21'
+ File::Find: '0'
+ File::Path: '0'
+ File::Spec: '0'
+ Scalar::Util: '0'
+ Sereal::Decoder: '3.00'
+ Test::LongString: '0'
+ Test::More: '0.88'
+ Test::Warn: '0'
configure_requires:
- ExtUtils::MakeMaker: 0
+ ExtUtils::MakeMaker: '0'
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.9, CPAN::Meta::Converter version 2.120351'
+generated_by: 'ExtUtils::MakeMaker version 6.9, CPAN::Meta::Converter version 2.141520'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Sereal-Encoder
no_index:
directory:
- t
- inc
requires:
- XSLoader: 0
- perl: 5.008
+ XSLoader: '0'
+ perl: '5.008'
resources:
bugtracker: https://github.com/Sereal/Sereal/issues
repository: git://github.com/Sereal/Sereal.git
-version: 3.001_002
+version: 3.001_003
use Carp qw/croak/;
use XSLoader;
-our $VERSION = '3.001_002'; # Don't forget to update the TestCompat set for testing against installed decoders!
+our $VERSION = '3.001_003'; # 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.
Beware that using this functionality means a significant slowdown for
object serialization. Even when serializing objects without a C<FREEZE>
method, the additional method look up will cost a small amount of runtime.
-Yes, C<Sereal::Encoder> is so fast that is may make a difference.
+Yes, C<Sereal::Encoder> is so fast that this may make a difference.
=head3 no_bless_objects
# open file handle if necessary and return it
sub get_fh {
my $self = shift;
- # This could also with fancier Moo(se) syntax
+ # This could also be done with fancier Moo(se) syntax
my $fh = $self->fh;
if (not $fh) {
open $fh, "<", $self->path or die $!;
File modified for Sereal by
Steffen Mueller <smueller@cpan.org>
+Yves Orton <demerphq@gmail.com>
+
*/
#ifndef CSNAPPY_INTERNAL_USERSPACE_H_
#define int32_t int
#define int16_t short
+#elif defined(__s390x__) || defined(__zarch__) || defined(__SYSC_ZARCH__)
+
+#define __BIG_ENDIAN 87654321
+#define __LITTLE_ENDIAN 12345678
+#define __BYTE_ORDER __BIG_ENDIAN
+
#endif
#ifndef bswap_16
ptr->x = v;
}
-#elif defined(__hpux) /* strict architectures */
+#elif defined(__hpux) || defined(__sparc) || defined(__sparc__) /* strict architectures */
/* For these platforms, there really are no unaligned loads/stores.
* Read/write everything as uint8_t. Smart compilers might recognize
#define expect_false(expr) expect((expr) != 0, 0)
#define expect_true(expr) expect((expr) != 0, 1)
+/* these defines are somewhat borrowed from miniz.c */
+
+#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__i386) || defined(__i486__) || defined(__i486) || defined(i386) || defined(__ia64__) || defined(__x86_64__)
+// SRL_X86_OR_X64_CPU is only used to help set the below macros.
+#define SRL_X86_OR_X64_CPU 1
+#endif
+
+#if SRL_X86_OR_X64_CPU && !defined(SRL_USE_ALIGNED_LOADS_AND_STORES)
+// Set SRL_USE_ALIGNED_LOADS_AND_STORES to 0 on CPU's that permit efficient integer loads and stores from unaligned addresses.
+#define SRL_USE_ALIGNED_LOADS_AND_STORES 0
+#endif
+
+/* HP-UX runs on Itanium but has strict alignment. */
+#ifdef __hpux
+#undef SRL_USE_ALIGNED_LOADS_AND_STORES
+#define SRL_USE_ALIGNED_LOADS_AND_STORES 1
+#endif
+
#endif
}
# For bootstrapping other language implementations' tests
+our $COMPRESS;
sub write_test_files {
my $dir = shift;
require File::Path;
_write_file($make_name_file_name->($testno), $t->[2] . "\n");
}
- my $encoder = Sereal::Encoder->new({protocol_version => $PROTO_VERSION});
+ my $encoder = Sereal::Encoder->new({
+ protocol_version => $PROTO_VERSION,
+ compress => $COMPRESS || Sereal::Encoder::SRL_UNCOMPRESSED(),
+ });
foreach my $i (0..$#RoundtripTests) {
my $testno = @BasicTests + $i + 1;
my $t = $RoundtripTests[$i];