diff options
author | Todd Rinaldo <toddr@cpan.org> | 2022-04-15 16:22:19 +0000 |
---|---|---|
committer | Todd Rinaldo <toddr@cpan.org> | 2022-04-18 17:35:37 -0500 |
commit | 0a1bd1ca787858675f565880ef436197b0ae5f22 (patch) | |
tree | 4e3398ba9ac06b995ca25a174516d9700918480e /dist/IO | |
parent | 34b62aa65c7a985078cbf79c36e529a89db91c3c (diff) | |
download | perl-0a1bd1ca787858675f565880ef436197b0ae5f22.tar.gz |
Update IO.xs to conform to ppport.h 3.68 recommendations
Bump version to 1.49_01 and update Changelog
Diffstat (limited to 'dist/IO')
-rw-r--r-- | dist/IO/ChangeLog | 7 | ||||
-rw-r--r-- | dist/IO/IO.pm | 2 | ||||
-rw-r--r-- | dist/IO/IO.xs | 5 |
3 files changed, 10 insertions, 4 deletions
diff --git a/dist/IO/ChangeLog b/dist/IO/ChangeLog index a4ed15ca22..67b08e549c 100644 --- a/dist/IO/ChangeLog +++ b/dist/IO/ChangeLog @@ -1,3 +1,10 @@ +IO 1.49_01 + * Update IO.xs to conform to ppport.h 3.68 recommendations + +IO 1.49 + * Send bug reports to https://github.com/perl/perl5/issues + * dist/IO/IO.xs: Rmv defns that ppport.h supplies + IO 1.48 * Fix for undefined warning in GH #18238 diff --git a/dist/IO/IO.pm b/dist/IO/IO.pm index a75cbdf23c..ecf2cfa797 100644 --- a/dist/IO/IO.pm +++ b/dist/IO/IO.pm @@ -7,7 +7,7 @@ use Carp; use strict; use warnings; -our $VERSION = "1.49"; +our $VERSION = "1.49_01"; XSLoader::load 'IO', $VERSION; sub import { diff --git a/dist/IO/IO.xs b/dist/IO/IO.xs index e3836370cc..db78f4d9f0 100644 --- a/dist/IO/IO.xs +++ b/dist/IO/IO.xs @@ -11,7 +11,6 @@ #define PERLIO_NOT_STDIO 1 #include "perl.h" #include "XSUB.h" -#define NEED_eval_pv #define NEED_newCONSTSUB #define NEED_newSVpvn_flags #include "ppport.h" @@ -250,7 +249,7 @@ new_tmpfile(packname = "IO::File") if (gv) (void) hv_delete(GvSTASH(gv), GvNAME(gv), GvNAMELEN(gv), G_DISCARD); if (gv && do_open(gv, "+>&", 3, FALSE, 0, 0, fp)) { - ST(0) = sv_2mortal(newRV((SV*)gv)); + ST(0) = sv_2mortal(newRV_inc((SV*)gv)); sv_bless(ST(0), gv_stashpv(packname, TRUE)); SvREFCNT_dec(gv); /* undo increment in newRV() */ } @@ -558,7 +557,7 @@ INIT: PPCODE: if (items != 1) Perl_croak(aTHX_ "usage: $io->%s()", ix ? "getline" : "getlines"); - if (!ix && GIMME_V != G_ARRAY) + if (!ix && GIMME_V != G_LIST) Perl_croak(aTHX_ "Can't call $io->getlines in a scalar context, use $io->getline"); Zero(&myop, 1, UNOP); myop.op_flags = (ix ? OPf_WANT_SCALAR : OPf_WANT_LIST ) | OPf_STACKED; |