diff options
author | Ben Morrow <ben@morrow.me.uk> | 2008-06-28 18:00:17 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-06-28 21:06:57 +0000 |
commit | 6e592b3a92f7ee35c9a857bd9a43297ab1693599 (patch) | |
tree | 262d198509e9c5efd2b2af3fcebb6daa6456c827 /doio.c | |
parent | 087986a76c08e8dfaaee54f8f476bfa315216671 (diff) | |
download | perl-6e592b3a92f7ee35c9a857bd9a43297ab1693599.tar.gz |
Some more missing isGV_with_GP()s
Message-ID: <20080628160017.GA81579@osiris.mauzo.dyndns.org>
p4raw-id: //depot/perl@34092
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -926,7 +926,7 @@ Perl_do_close(pTHX_ GV *gv, bool not_implicit) if (!gv) gv = PL_argvgv; - if (!gv || SvTYPE(gv) != SVt_PVGV) { + if (!gv || !isGV_with_GP(gv)) { if (not_implicit) SETERRNO(EBADF,SS_IVCHAN); return FALSE; @@ -1307,11 +1307,11 @@ Perl_my_stat(pTHX) const char *s; STRLEN len; PUTBACK; - if (SvTYPE(sv) == SVt_PVGV) { + if (isGV_with_GP(sv)) { gv = (GV*)sv; goto do_fstat; } - else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVGV) { + else if (SvROK(sv) && isGV_with_GP(SvRV(sv))) { gv = (GV*)SvRV(sv); goto do_fstat; } @@ -1363,7 +1363,7 @@ Perl_my_lstat(pTHX) PL_statgv = NULL; sv = POPs; PUTBACK; - if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVGV && ckWARN(WARN_IO)) { + if (SvROK(sv) && isGV_with_GP(SvRV(sv)) && ckWARN(WARN_IO)) { Perl_warner(aTHX_ packWARN(WARN_IO), "Use of -l on filehandle %s", GvENAME((GV*) SvRV(sv))); return (PL_laststatval = -1); @@ -1624,7 +1624,7 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp) tot = sp - mark; while (++mark <= sp) { GV* gv; - if (SvTYPE(*mark) == SVt_PVGV) { + if (isGV_with_GP(*mark)) { gv = (GV*)*mark; do_fchmod: if (GvIO(gv) && IoIFP(GvIOp(gv))) { @@ -1640,7 +1640,7 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp) tot--; } } - else if (SvROK(*mark) && SvTYPE(SvRV(*mark)) == SVt_PVGV) { + else if (SvROK(*mark) && isGV_with_GP(SvRV(*mark))) { gv = (GV*)SvRV(*mark); goto do_fchmod; } @@ -1664,7 +1664,7 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp) tot = sp - mark; while (++mark <= sp) { GV* gv; - if (SvTYPE(*mark) == SVt_PVGV) { + if (isGV_with_GP(*mark)) { gv = (GV*)*mark; do_fchown: if (GvIO(gv) && IoIFP(GvIOp(gv))) { @@ -1680,7 +1680,7 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp) tot--; } } - else if (SvROK(*mark) && SvTYPE(SvRV(*mark)) == SVt_PVGV) { + else if (SvROK(*mark) && isGV_with_GP(SvRV(*mark))) { gv = (GV*)SvRV(*mark); goto do_fchown; } @@ -1836,7 +1836,7 @@ nothing in the core. tot = sp - mark; while (++mark <= sp) { GV* gv; - if (SvTYPE(*mark) == SVt_PVGV) { + if (isGV_with_GP(*mark)) { gv = (GV*)*mark; do_futimes: if (GvIO(gv) && IoIFP(GvIOp(gv))) { @@ -1853,7 +1853,7 @@ nothing in the core. tot--; } } - else if (SvROK(*mark) && SvTYPE(SvRV(*mark)) == SVt_PVGV) { + else if (SvROK(*mark) && isGV_with_GP(SvRV(*mark))) { gv = (GV*)SvRV(*mark); goto do_futimes; } |