diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-04-22 22:32:09 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-05-21 16:51:32 -0700 |
commit | e33525913afb6ff03f7a9e1f9881fd5ea6982f22 (patch) | |
tree | a1d8a854f5d7f8fc42bd43fb00c827944d0754ab /ext | |
parent | 6d77e8c75fe4eeaaa87223507d2214238206bf19 (diff) | |
download | perl-e33525913afb6ff03f7a9e1f9881fd5ea6982f22.tar.gz |
[perl #111000] Let hv_store work on hint hashes
Magic attached to hash elements has its key stored differently depend-
ing on how it was supplied to hv_common. hv_store passes a string/
length pair to hv_common, while hv_store_ent passes an SV.
magic_clearhint wasn’t able to handle string/length pairs, and only
worked with SVs, resulting in assertion failures or crashes.
This commit fixes magic_clearhint, so that XS code can use hv_store on
hint hashes.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/XS-APItest/t/hash.t | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/XS-APItest/t/hash.t b/ext/XS-APItest/t/hash.t index 0fdd64e7ce..84b6274bdd 100644 --- a/ext/XS-APItest/t/hash.t +++ b/ext/XS-APItest/t/hash.t @@ -260,6 +260,16 @@ sub test_precomputed_hashes { pass 'no crash when writing to hash elem with null value via slice'; } +# [perl #111000] Bug number eleventy-one thousand: +# hv_store should work on hint hashes +eval q{ + BEGIN { + XS::APItest::Hash::store \%^H, "XS::APItest/hash.t", undef; + delete $^H{"XS::APItest/hash.t"}; + } +}; +pass("hv_store works on the hint hash"); + done_testing; exit; |