summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-07-24 07:18:07 -0600
committerKarl Williamson <khw@cpan.org>2021-07-30 06:11:46 -0600
commit8dc965c6119f31dfdda629afa35c214d43b367a5 (patch)
tree1bfc255780e283c3cf476635f4b9c68209058a86 /dist
parentef2ae5f23b9be3eda84dc1907b3b1ba5217e9cd7 (diff)
downloadperl-8dc965c6119f31dfdda629afa35c214d43b367a5.tar.gz
Storable: Save a '&' instr by casting to U8
Diffstat (limited to 'dist')
-rw-r--r--dist/Storable/Storable.pm2
-rw-r--r--dist/Storable/Storable.xs2
2 files changed, 2 insertions, 2 deletions
diff --git a/dist/Storable/Storable.pm b/dist/Storable/Storable.pm
index 27c9cf54c3..c1c94f04c1 100644
--- a/dist/Storable/Storable.pm
+++ b/dist/Storable/Storable.pm
@@ -28,7 +28,7 @@ our @EXPORT_OK = qw(
our ($canonical, $forgive_me);
BEGIN {
- our $VERSION = '3.23';
+ our $VERSION = '3.24';
}
our $recursion_limit;
diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs
index 70dddf3f10..30fd69fbec 100644
--- a/dist/Storable/Storable.xs
+++ b/dist/Storable/Storable.xs
@@ -1247,7 +1247,7 @@ static const char byteorderstr_56[] = {BYTEORDER_BYTES_56, 0};
# define Sntohl(x) (x)
# else
static U32 Sntohl(U32 x) {
- return ((x & 0xFF) << 24) + ((x * 0xFF00) << 8)
+ return (((U8) x) << 24) + ((x * 0xFF00) << 8)
+ ((x & 0xFF0000) >> 8) + ((x & 0xFF000000) >> 24);
}
# endif