-
/* trees.c -- output deflated data using Huffman coding
* Copyright (C) 1995-2021 Jean-loup Gailly
* detect_data_type() function provided freely by Cosmin Truta, 2006
#include "deflate.h"
+/*
+ Perl-specific change to allow building with C++
+ The 'register' keyword not allowed from C++17
+ see https://github.com/pmqs/Compress-Raw-Zlib/issues/23
+*/
+#define register
+
#ifdef ZLIB_DEBUG
# include <ctype.h>
#endif
unsigned code,
int len)
{
- unsigned res = 0;
+ register unsigned res = 0;
do {
res |= code & 1;
code >>= 1, res <<= 1;