X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perlio.c;h=0a086a8b4f2ef84f7b85ea2bdcb225338f1ee813;hb=8177d4d97c5035e1ca045371b1be47a2ef66ec1d;hp=5db65b931aa202b6fdd13e3cc5753e00c56cf117;hpb=94ccb8071447cc02333d411ff69ed91cc131500a;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perlio.c b/perlio.c index 5db65b9..0a086a8 100644 --- a/perlio.c +++ b/perlio.c @@ -807,7 +807,7 @@ PerlIO_find_layer(pTHX_ const char *name, STRLEN len, int load) } else { SV * const pkgsv = newSVpvs("PerlIO"); SV * const layer = newSVpvn(name, len); - CV * const cv = Perl_get_cvn_flags(aTHX_ STR_WITH_LEN("PerlIO::Layer::NoWarnings"), 0); + CV * const cv = get_cvs("PerlIO::Layer::NoWarnings", 0); ENTER; SAVEINT(PL_in_load_module); if (cv) { @@ -3033,7 +3033,9 @@ PerlIOStdio_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags) stdio = PerlSIO_fdopen(fd, PerlIO_modestr(o,mode)); set_this: PerlIOSelf(f, PerlIOStdio)->stdio = stdio; - PerlIOUnix_refcnt_inc(fileno(stdio)); + if(stdio) { + PerlIOUnix_refcnt_inc(fileno(stdio)); + } } return f; }