diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-12-31 18:58:29 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-12-31 19:11:40 -0800 |
commit | 8571a3cc77b8338413df698a2f0c959b543a32e5 (patch) | |
tree | fe6073ee9ff932a327fa2cd35374507dee9e5412 /hv.c | |
parent | 3b2cd8095a6fc52afccf519205a3c5a92669b0c3 (diff) | |
download | perl-8571a3cc77b8338413df698a2f0c959b543a32e5.tar.gz |
squash some code in hv.c:S_hv_delete_common
Changes four commits ago made this possible.
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -1049,14 +1049,8 @@ S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, mro_changes = 1; } - if (d_flags & G_DISCARD) { - sv = HeVAL(entry); - HeVAL(entry) = &PL_sv_placeholder; - } - else { - sv = sv_2mortal(HeVAL(entry)); - HeVAL(entry) = &PL_sv_placeholder; - } + sv = d_flags & G_DISCARD ? HeVAL(entry) : sv_2mortal(HeVAL(entry)); + HeVAL(entry) = &PL_sv_placeholder; if (sv) { /* deletion of method from stash */ if (isGV(sv) && isGV_with_GP(sv) && GvCVu(sv) |