summaryrefslogtreecommitdiff
path: root/ext/Compress
diff options
context:
space:
mode:
authorPaul Marquess <paul.marquess@btinternet.com>2005-10-10 00:25:38 +0100
committerSteve Peters <steve@fisharerojo.org>2005-10-10 01:18:58 +0000
commitd967198d03d8a5da5031998230685b8e4fbd0285 (patch)
tree8d2437600a5fd019736daa64423d662bed54cb77 /ext/Compress
parent8e0928151ff65b2f29cbe14e9d17df0f0be31749 (diff)
downloadperl-d967198d03d8a5da5031998230685b8e4fbd0285.tar.gz
RE: [PATCH] DB_File 1.1812
Patch to ext/Compress/Zlib/Zlib.xs from Paul Marquess. p4raw-id: //depot/perl@25725
Diffstat (limited to 'ext/Compress')
-rw-r--r--ext/Compress/Zlib/Zlib.xs12
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/Compress/Zlib/Zlib.xs b/ext/Compress/Zlib/Zlib.xs
index 5d648903ed..19b5b6b000 100644
--- a/ext/Compress/Zlib/Zlib.xs
+++ b/ext/Compress/Zlib/Zlib.xs
@@ -996,8 +996,8 @@ deflate (s, buf, output)
if (DO_UTF8(buf) && !sv_utf8_downgrade(buf, 1))
croak("Wide character in Compress::Zlib::Deflate::deflate input parameter");
#endif
- s->stream.next_in = (Bytef*)SvPVbyte(buf, *(STRLEN*)&s->stream.avail_in) ;
- /* s->stream.avail_in = SvCUR(buf) ; */
+ s->stream.next_in = (Bytef*)SvPVbyte_nolen(buf) ;
+ s->stream.avail_in = SvCUR(buf) ;
if (s->flags & FLAG_CRC32)
s->crc32 = crc32(s->crc32, s->stream.next_in, s->stream.avail_in) ;
@@ -1346,6 +1346,7 @@ inflate (s, buf, output)
uInt cur_length = NO_INIT
uInt prefix_length = NO_INIT
uInt increment = NO_INIT
+ STRLEN stmp = NO_INIT
PREINIT:
#ifdef UTF8_AVAILABLE
bool out_utf8 = FALSE;
@@ -1362,7 +1363,8 @@ inflate (s, buf, output)
#endif
/* initialise the input buffer */
- s->stream.next_in = (Bytef*)SvPVbyte_force(buf, *(STRLEN*)&s->stream.avail_in) ;
+ s->stream.next_in = (Bytef*)SvPVbyte_force(buf, stmp) ;
+ s->stream.avail_in = SvCUR(buf) ;
/* and retrieve the output buffer */
output = deRef_l(output, "inflate") ;
@@ -1626,6 +1628,7 @@ scan(s, buf, out=NULL)
SV * buf
SV * out
int start_len = NO_INIT
+ STRLEN stmp = NO_INIT
ALIAS:
inflate = 1
CODE:
@@ -1642,7 +1645,8 @@ scan(s, buf, out=NULL)
#endif
/* initialise the input buffer */
- s->stream.next_in = (Bytef*)SvPVbyte_force(buf, *(STRLEN*)&s->stream.avail_in) ;
+ s->stream.next_in = (Bytef*)SvPVbyte_force(buf, stmp) ;
+ s->stream.avail_in = SvCUR(buf) ;
start_len = s->stream.avail_in ;
s->bytesInflated = 0 ;
do