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);