This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #92254, #92256] Fix SAVE_DEFSV to do refcounting
authorFather Chrysostomos <sprout@cpan.org>
Mon, 9 Jan 2012 02:14:03 +0000 (18:14 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 9 Jan 2012 07:13:36 +0000 (23:13 -0800)
commit55b5114f4ff694ab871173b736aa2d48bb095684
tree8258cd178c80da1a45ea12f0e511f1668822e798
parentbbff98dc509eb269f4500b2698d1ab918152f9d2
[perl #92254, #92256] Fix SAVE_DEFSV to do refcounting

The current definition of SAVE_DEFSV doesn’t take reference count-
ing into account.  Every instance of it in the perl core is buggy
as a result.

Most are also followed by DEFSV_set, which is likewise buggy.

This commit implements SAVE_DEFSV in terms of save_gp and
SAVEGENERICSV if PERL_CORE is defined.  save_gp and SAVEGENERICSV are
what local(*_) = \$foo uses.  Changing the definition for XS code is
probably too risky this close to 5.16.  It should probably be changed
later, though.

DEFSV_set is now changed to do reference counting too.
perl.h
pp_ctl.c
t/op/grep.t
t/re/reg_eval_scope.t