diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-06-04 11:54:10 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-06-04 14:34:30 -0700 |
commit | e5accad2c334d0d98a2eb0bcfa8f8363dfc3c78a (patch) | |
tree | 93bb5bd3e7fbe2978310c451a9bd0c14b916bb31 /hv.c | |
parent | a130272381198bb249482fb77a994df28ddaf3bf (diff) | |
download | perl-e5accad2c334d0d98a2eb0bcfa8f8363dfc3c78a.tar.gz |
Allow COW values to be deleted from restricted hashes
I wonder how many other things a604c75 broke....
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1003,7 +1003,8 @@ S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, Safefree(key); return NULL; } - if (SvREADONLY(hv) && HeVAL(entry) && SvREADONLY(HeVAL(entry))) { + if (SvREADONLY(hv) && HeVAL(entry) && SvREADONLY(HeVAL(entry)) + && !SvIsCOW(HeVAL(entry))) { hv_notallowed(k_flags, key, klen, "Attempt to delete readonly key '%"SVf"' from" " a restricted hash"); |