Skip to content

Commit 6aa3481

Browse files
committed
cpan/Compress-Raw-Zlib - Update to version 2.205
2.205 16 July 2023 * 2.205 Sun, 16 Jul 2023 16:11:31 +0100 3effdb9dbaa9bedfff3cad44902e515409ffae78 * Test::More::isn't warns in perl 5.38 Sun, 9 Jul 2023 21:38:15 +0100 928bbc6ddc5178621fb477b38a1b4b4de38866cf * add zlib-ng 2.1.3 Thu, 29 Jun 2023 19:51:58 +0100 b1aa2583b4c114c2194890a0e015fdc439928c31 * add zlib-ng 2.1.2 Fri, 9 Jun 2023 14:51:17 +0100 0d505d9156ca7e9cac15e2d6e574099300f91a14 * Change storage of ZLIBNG_VER_STATUS from IV to PV pmqs/Compress-Raw-Zlib#24 Fri, 9 Jun 2023 14:30:36 +0100 0a8fb7141a43b8e49609fb06f05fad5150a97c2a * Fix to allow building with C++17 register keyword not allowed in C++17 pmqs/Compress-Raw-Zlib#23 Mon, 22 May 2023 12:42:51 +0100 a7c12acdd4ce7fdc070f50ac78e68e04c8699c81 * Change while loop for `LimitOutput` example pmqs/Compress-Raw-Zlib#21 Sun, 21 May 2023 21:32:19 +0100 972f03b5b0bf06d44991bbee2d2c9216e4175154 * [doc] zlib.h: Remove duplicate "the" (#22) Mon, 1 May 2023 22:46:39 +0200 89b43e6978d8e9b16801f48881cadf822585be0d * Add zlib compat version for 2.0.7 Sat, 18 Mar 2023 08:42:59 +0000 e7d79cbd5924fbdcd3515fb3b0ad171c7720105c
1 parent 93297d4 commit 6aa3481

File tree

9 files changed

+50
-23
lines changed

9 files changed

+50
-23
lines changed

MANIFEST

+2-2
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ cpan/Compress-Raw-Zlib/t/02zlib.t Compress::Raw::Zlib
435435
cpan/Compress-Raw-Zlib/t/07bufsize.t Compress::Raw::Zlib
436436
cpan/Compress-Raw-Zlib/t/09limitoutput.t Compress::Raw::Zlib
437437
cpan/Compress-Raw-Zlib/t/18lvalue.t Compress::Raw::Zlib
438-
cpan/Compress-Raw-Zlib/t/19nonpv.t
439-
cpan/Compress-Raw-Zlib/t/compress/CompTestUtils.pm
438+
cpan/Compress-Raw-Zlib/t/19nonpv.t Test file related to Compress::Raw::Zlib
439+
cpan/Compress-Raw-Zlib/t/compress/CompTestUtils.pm Module related to Compress::Raw::Zlib
440440
cpan/Compress-Raw-Zlib/typemap Compress::Raw::Zlib
441441
cpan/Compress-Raw-Zlib/Zlib.xs Compress::Raw::Zlib
442442
cpan/Compress-Raw-Zlib/zlib-src/adler32.c Compress::Raw::Zlib

Porting/Maintainers.pl

+2-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ package Maintainers;
218218
},
219219

220220
'Compress::Raw::Zlib' => {
221-
'DISTRIBUTION' => 'PMQS/Compress-Raw-Zlib-2.204.tar.gz',
221+
'DISTRIBUTION' => 'PMQS/Compress-Raw-Zlib-2.205.tar.gz',
222+
'SYNCINFO' => 'jkeenan on Wed Jul 19 09:58:08 2023',
222223
'FILES' => q[cpan/Compress-Raw-Zlib],
223224
'EXCLUDED' => [
224225
qr{^examples/},

cpan/Compress-Raw-Zlib/Makefile.PL

-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ my @names = qw(
201201
ZLIBNG_VER_MAJOR
202202
ZLIBNG_VER_MINOR
203203
ZLIBNG_VER_REVISION
204-
ZLIBNG_VER_STATUS
205204
ZLIBNG_VER_MODIFIED
206205
);
207206

cpan/Compress-Raw-Zlib/Zlib.xs

+11
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,17 @@ ZLIB_VERNUM()
951951
uLong
952952
Zip_zlibCompileFlags()
953953

954+
const char*
955+
ZLIBNG_VER_STATUS()
956+
CODE:
957+
#ifdef ZLIBNG_VER_STATUS
958+
RETVAL = STRINGIFY(ZLIBNG_VER_STATUS);
959+
#else
960+
RETVAL = "0";
961+
#endif
962+
OUTPUT:
963+
RETVAL
964+
954965
MODULE = Compress::Raw::Zlib PACKAGE = Compress::Raw::Zlib PREFIX = Zip_
955966

956967
#define Zip_adler32(buf, adler) CRZ_adler32(adler, buf, (uInt)len)

cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use warnings ;
1010
use bytes ;
1111
our ($VERSION, $XS_VERSION, @ISA, @EXPORT, %EXPORT_TAGS, @EXPORT_OK, $AUTOLOAD, %DEFLATE_CONSTANTS, @DEFLATE_CONSTANTS);
1212

13-
$VERSION = '2.204_001';
13+
$VERSION = '2.205';
1414
$XS_VERSION = $VERSION;
1515
$VERSION = eval $VERSION;
1616

@@ -1282,7 +1282,7 @@ simpler.
12821282
last OUTER
12831283
unless $status == Z_OK || $status == Z_BUF_ERROR ;
12841284
}
1285-
while ($status == Z_OK && length $input);
1285+
while length $input;
12861286
}
12871287
12881288
die "inflation failed\n"
@@ -1453,7 +1453,7 @@ Below is typical code that shows how to use C<LimitOutput>.
14531453
last OUTER
14541454
unless $status == Z_OK || $status == Z_BUF_ERROR ;
14551455
}
1456-
while ($status == Z_OK && length $input);
1456+
while length $input;
14571457
}
14581458
14591459
die "inflation failed\n"

cpan/Compress-Raw-Zlib/t/01version.t

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ SKIP:
6767
'2.0.4' => '1.2.11.zlib-ng',
6868
'2.0.5' => '1.2.11.zlib-ng',
6969
'2.0.6' => '1.2.11.zlib-ng',
70+
'2.0.7' => '1.2.11.zlib-ng',
71+
'2.1.2' => '1.2.13.zlib-ng',
72+
'2.1.3' => '1.2.13.zlib-ng',
7073
);
7174

7275
my $zv = Compress::Raw::Zlib::zlibng_version();

cpan/Compress-Raw-Zlib/zlib-src/deflate.c

+20-13
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@
5151

5252
#include "deflate.h"
5353

54+
/*
55+
Perl-specific change to allow building with C++
56+
The 'register' keyword not allowed from C++17
57+
see https://github.com/pmqs/Compress-Raw-Zlib/issues/23
58+
*/
59+
#define register
60+
5461
const char deflate_copyright[] =
5562
" deflate 1.2.13 Copyright 1995-2022 Jean-loup Gailly and Mark Adler ";
5663
/*
@@ -1279,9 +1286,9 @@ local uInt longest_match(
12791286
IPos cur_match)
12801287
{
12811288
unsigned chain_length = s->max_chain_length;/* max hash chain length */
1282-
Bytef *scan = s->window + s->strstart; /* current string */
1283-
Bytef *match; /* matched string */
1284-
int len; /* length of current match */
1289+
register Bytef *scan = s->window + s->strstart; /* current string */
1290+
register Bytef *match; /* matched string */
1291+
register int len; /* length of current match */
12851292
int best_len = (int)s->prev_length; /* best match length so far */
12861293
int nice_match = s->nice_match; /* stop if match long enough */
12871294
IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
@@ -1296,13 +1303,13 @@ local uInt longest_match(
12961303
/* Compare two bytes at a time. Note: this is not always beneficial.
12971304
* Try with and without -DUNALIGNED_OK to check.
12981305
*/
1299-
Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
1300-
ush scan_start = *(ushf*)scan;
1301-
ush scan_end = *(ushf*)(scan + best_len - 1);
1306+
register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
1307+
register ush scan_start = *(ushf*)scan;
1308+
register ush scan_end = *(ushf*)(scan + best_len - 1);
13021309
#else
1303-
Bytef *strend = s->window + s->strstart + MAX_MATCH;
1304-
Byte scan_end1 = scan[best_len - 1];
1305-
Byte scan_end = scan[best_len];
1310+
register Bytef *strend = s->window + s->strstart + MAX_MATCH;
1311+
register Byte scan_end1 = scan[best_len - 1];
1312+
register Byte scan_end = scan[best_len];
13061313
#endif
13071314

13081315
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
@@ -1429,10 +1436,10 @@ local uInt longest_match(
14291436
deflate_state *s,
14301437
IPos cur_match)
14311438
{
1432-
Bytef *scan = s->window + s->strstart; /* current string */
1433-
Bytef *match; /* matched string */
1434-
int len; /* length of current match */
1435-
Bytef *strend = s->window + s->strstart + MAX_MATCH;
1439+
register Bytef *scan = s->window + s->strstart; /* current string */
1440+
register Bytef *match; /* matched string */
1441+
register int len; /* length of current match */
1442+
register Bytef *strend = s->window + s->strstart + MAX_MATCH;
14361443

14371444
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
14381445
* It is easy to get rid of this optimization if necessary.

cpan/Compress-Raw-Zlib/zlib-src/trees.c

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* trees.c -- output deflated data using Huffman coding
32
* Copyright (C) 1995-2021 Jean-loup Gailly
43
* detect_data_type() function provided freely by Cosmin Truta, 2006
@@ -37,6 +36,13 @@
3736

3837
#include "deflate.h"
3938

39+
/*
40+
Perl-specific change to allow building with C++
41+
The 'register' keyword not allowed from C++17
42+
see https://github.com/pmqs/Compress-Raw-Zlib/issues/23
43+
*/
44+
#define register
45+
4046
#ifdef ZLIB_DEBUG
4147
# include <ctype.h>
4248
#endif
@@ -1140,7 +1146,7 @@ local unsigned bi_reverse(
11401146
unsigned code,
11411147
int len)
11421148
{
1143-
unsigned res = 0;
1149+
register unsigned res = 0;
11441150
do {
11451151
res |= code & 1;
11461152
code >>= 1, res <<= 1;

cpan/Compress-Raw-Zlib/zlib-src/zlib.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
729729
Then no more input data should be provided before the deflateParams() call.
730730
If this is done, the old level and strategy will be applied to the data
731731
compressed before deflateParams(), and the new level and strategy will be
732-
applied to the the data compressed after deflateParams().
732+
applied to the data compressed after deflateParams().
733733
734734
deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
735735
state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if

0 commit comments

Comments
 (0)