diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2017-08-30 22:35:17 +0100 |
---|---|---|
committer | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2017-09-04 10:12:04 +0100 |
commit | f6107ca24b4cf22dcf7fd69d65612ad718c48fca (patch) | |
tree | 376e6bd33ed798472b0461bc6fe7ebe70a471608 /pp_sort.c | |
parent | ae2cf9f62925677edff191c3f0de1a05a16e4f2f (diff) | |
download | perl-f6107ca24b4cf22dcf7fd69d65612ad718c48fca.tar.gz |
Strengthen weak refs when sorting in-place
It's conceptually an assignment, which should strengthen any weak refs.
Reported-by: Tom Molesworth <team@cpan.org>
Diffstat (limited to 'pp_sort.c')
-rw-r--r-- | pp_sort.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1769,6 +1769,9 @@ PP(pp_sort) base[i] = newSVsv(sv); else SvREFCNT_inc_simple_void_NN(sv); + + if (SvWEAKREF(sv)) + sv_rvunweaken(sv); } av_clear(av); if (max > 0) { |