diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-12-30 16:53:39 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-12-30 16:53:39 +0000 |
commit | 5b285ea4a6ead2df7b4a0a11b0aff949429e0500 (patch) | |
tree | 2c57c3e9f4ca7311811702b602feb05f3d1ef697 /sv.c | |
parent | d7cbc7b5c258cffaf362ecafb36c5dfc354c1ffa (diff) | |
download | perl-5b285ea4a6ead2df7b4a0a11b0aff949429e0500.tar.gz |
Document why it's a bad plan to move the backreferences array from
the magic structure to the hv_aux structure during backreference
deletion. Add an optimisation for an empty backreference array.
p4raw-id: //depot/perl@26542
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -4409,6 +4409,10 @@ S_sv_del_backref(pTHX_ SV *tsv, SV *sv) if (SvTYPE(tsv) == SVt_PVHV && SvOOK(tsv)) { av = *Perl_hv_backreferences_p(aTHX_ (HV*)tsv); + /* We mustn't attempt to "fix up" the hash here by moving the + backreference array back to the hv_aux structure, as that is stored + in the main HvARRAY(), and hfreentries assumes that no-one + reallocates HvARRAY() while it is running. */ } if (!av) { const MAGIC *const mg |