diff options
author | Vincent Pit <vincent@dromedary.ams6.corp.booking.com> | 2011-10-26 22:19:59 +0200 |
---|---|---|
committer | Vincent Pit <perl@profvince.com> | 2011-10-26 22:30:01 +0200 |
commit | be3a19dc35a91ca3489fb66a37344b8e0aec6976 (patch) | |
tree | 02ce6c41575371f490e1625c2d3d8f7b8bdb9f57 | |
parent | 00441cfaf30f333fb7f20be1cf3913667a6f533d (diff) | |
download | perl-vincent/be_gone_hv_common_gmagical.tar.gz |
Stop treating hashes with the GMAGICAL flag set like tied hashesvincent/be_gone_hv_common_gmagical
-rw-r--r-- | hv.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -399,9 +399,7 @@ Perl_hv_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, xhv = (XPVHV*)SvANY(hv); if (SvMAGICAL(hv)) { if (SvRMAGICAL(hv) && !(action & (HV_FETCH_ISSTORE|HV_FETCH_ISEXISTS))) { - if (mg_find((const SV *)hv, PERL_MAGIC_tied) - || SvGMAGICAL((const SV *)hv)) - { + if (mg_find((const SV *)hv, PERL_MAGIC_tied)) { /* FIXME should be able to skimp on the HE/HEK here when HV_FETCH_JUST_SV is true. */ if (!keysv) { @@ -475,8 +473,7 @@ Perl_hv_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, #endif } /* ISFETCH */ else if (SvRMAGICAL(hv) && (action & HV_FETCH_ISEXISTS)) { - if (mg_find((const SV *)hv, PERL_MAGIC_tied) - || SvGMAGICAL((const SV *)hv)) { + if (mg_find((const SV *)hv, PERL_MAGIC_tied)) { /* I don't understand why hv_exists_ent has svret and sv, whereas hv_exists only had one. */ SV * const svret = sv_newmortal(); |