This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
SvUPGRADE returns void in blead
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 10 Jun 2005 12:07:01 +0000 (12:07 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 10 Jun 2005 12:07:01 +0000 (12:07 +0000)
p4raw-id: //depot/perl@24787

ext/Compress/Zlib/Zlib.xs

index 2421f2c..a9f6297 100644 (file)
@@ -422,8 +422,7 @@ Zip_gzread(file, buf, len=4096)
        CODE:
        if (SvREADONLY(buf) && PL_curcop != &PL_compiling)
             croak("gzread: buffer parameter is read-only");
-        if (!SvUPGRADE(buf, SVt_PV))
-            croak("cannot use buf argument as lvalue");
+        SvUPGRADE(buf, SVt_PV);
         SvPOK_only(buf);
         SvCUR_set(buf, 0);
        /* any left over from gzreadline ? */
@@ -468,8 +467,7 @@ gzreadline(file, buf)
        CODE:
        if (SvREADONLY(buf) && PL_curcop != &PL_compiling) 
             croak("gzreadline: buffer parameter is read-only"); 
-        if (!SvUPGRADE(buf, SVt_PV))
-            croak("cannot use buf argument as lvalue");
+        SvUPGRADE(buf, SVt_PV);
         SvPOK_only(buf);
        /* sv_setpvn(buf, "", SIZE) ; */
         SvGROW(buf, SIZE) ;