diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-07-29 00:26:55 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-07-29 00:28:01 -0700 |
commit | d96ab1b5f316fcb0109627c2060d3b7f8a7b5016 (patch) | |
tree | dd5c68bc32106b4dc2d45e7f733a385f2bb7fe32 /universal.c | |
parent | 019070c31184a4deb57cb85f7e597a789c6c5b54 (diff) | |
download | perl-d96ab1b5f316fcb0109627c2060d3b7f8a7b5016.tar.gz |
Remove some redundant magical flag checks
Now that gmagical svs use the OK flags the same way as muggles,
things like SvPOK || (SvGMAGICAL && SvPOKp) are no longer necessary.
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/universal.c b/universal.c index a7c480f52c..cb49e0b2f0 100644 --- a/universal.c +++ b/universal.c @@ -198,8 +198,7 @@ Perl_sv_does_sv(pTHX_ SV *sv, SV *namesv, U32 flags) SvGETMAGIC(sv); - if (!SvOK(sv) || !(SvROK(sv) || (SvPOK(sv) && SvCUR(sv)) - || (SvGMAGICAL(sv) && SvPOKp(sv) && SvCUR(sv)))) { + if (!SvOK(sv) || !(SvROK(sv) || (SvPOK(sv) && SvCUR(sv)))) { LEAVE; return FALSE; } @@ -334,8 +333,7 @@ XS(XS_UNIVERSAL_isa) SvGETMAGIC(sv); - if (!SvOK(sv) || !(SvROK(sv) || (SvPOK(sv) && SvCUR(sv)) - || (SvGMAGICAL(sv) && SvPOKp(sv) && SvCUR(sv)))) + if (!SvOK(sv) || !(SvROK(sv) || (SvPOK(sv) && SvCUR(sv)))) XSRETURN_UNDEF; ST(0) = boolSV(sv_derived_from_sv(sv, ST(1), 0)); @@ -359,7 +357,7 @@ XS(XS_UNIVERSAL_can) SvGETMAGIC(sv); if (!SvOK(sv) || !(SvROK(sv) || SvNIOK(sv) || (SvPOK(sv) && SvCUR(sv)) - || (SvGMAGICAL(sv) && (SvNIOKp(sv) || (SvPOKp(sv) && SvCUR(sv)))))) + )) XSRETURN_UNDEF; rv = &PL_sv_undef; |