From 094a3eec8ad4cfb12d72a98f11e9186594579b57 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sat, 10 Sep 2011 18:39:12 -0700 Subject: Make filetest ops handle get-magic correctly for glob(ref)s This patch uses the recently-added MAYBE_DEREF_GV macro which puts the glob deref logic in one spot. It also adds _nomg and _flags varia- tions of it. _flags understands the SV_GMAGIC flag. --- doio.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'doio.c') diff --git a/doio.c b/doio.c index 1ce6acc4ae..6b5300ce72 100644 --- a/doio.c +++ b/doio.c @@ -1299,12 +1299,7 @@ Perl_my_stat_flags(pTHX_ const U32 flags) const char *s; STRLEN len; PUTBACK; - if (isGV_with_GP(sv)) { - gv = MUTABLE_GV(sv); - goto do_fstat; - } - else if (SvROK(sv) && isGV_with_GP(SvRV(sv))) { - gv = MUTABLE_GV(SvRV(sv)); + if ((gv = MAYBE_DEREF_GV_flags(sv,flags))) { goto do_fstat; } else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) { -- cgit v1.2.1