Skip Menu |

This queue is for tickets about the Compress-Bzip2 CPAN distribution.

Report information
The Basics
Id: 82308
Status: resolved
Priority: 0/
Queue: Compress-Bzip2

People
Owner: Nobody in particular
Requestors: schubiger [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 2.09
Fixed in: (no value)



Subject: make breaks on 5.17.7
Compress-Bzip2-2.09, as example, breaks with: Bzip2.xs: In function 'XS_Compress__Bzip2_bzread': Bzip2.xs:2180: error: invalid use of void expression Bzip2.xs: In function 'XS_Compress__Bzip2_bzreadline': Bzip2.xs:2214: error: invalid use of void expression This is due to a change to the SvUPGRADE() macro (see http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2012-12/msg00424.html for relevant discussion). Patch attached.
Subject: sv_upgrade.patch
diff -ru Compress-Bzip2-2.09_old/Bzip2.xs Compress-Bzip2-2.09_new/Bzip2.xs --- Compress-Bzip2-2.09_old/Bzip2.xs 2005-08-09 19:50:58.000000000 +0200 +++ Compress-Bzip2-2.09_new/Bzip2.xs 2012-12-28 16:58:37.000000000 +0100 @@ -2177,8 +2177,7 @@ { if (SvREADONLY(buf) && PL_curcop != &PL_compiling) croak("bzread: buffer parameter is read-only"); - if (!SvUPGRADE(buf, SVt_PV)) - croak("bzread: cannot use buf argument as lvalue"); + SvUPGRADE(buf, SVt_PV); SvPOK_only(buf); SvCUR_set(buf, 0); @@ -2211,8 +2210,7 @@ { if (SvREADONLY(buf) && PL_curcop != &PL_compiling) croak("bzreadline: buffer parameter is read-only"); - if (!SvUPGRADE(buf, SVt_PV)) - croak("bzreadline: cannot use buf argument as lvalue"); + SvUPGRADE(buf, SVt_PV); SvPOK_only(buf); SvCUR_set(buf, 0);
Thanks for the patch. The fix will be in the upcoming 2.10. See https://github.com/rurban/Compress-Bzip2/commit/07a44b0105d2f366b263ca34567ddaafa861a231 On Fri Dec 28 12:53:06 2012, SCHUBIGER wrote: Show quoted text
> Compress-Bzip2-2.09, as example, breaks with: > > Bzip2.xs: In function 'XS_Compress__Bzip2_bzread': > Bzip2.xs:2180: error: invalid use of void expression > Bzip2.xs: In function 'XS_Compress__Bzip2_bzreadline': > Bzip2.xs:2214: error: invalid use of void expression > > This is due to a change to the SvUPGRADE() macro (see > http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2012-12/msg00424.html > for relevant discussion). > > Patch attached.
-- Reini Urban