This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0bb9bf
)
POPLOOP(): no need to mortalise current item
author
David Mitchell
<davem@iabyn.com>
Thu, 27 Aug 2015 12:40:20 +0000
(13:40 +0100)
committer
David Mitchell
<davem@iabyn.com>
Wed, 3 Feb 2016 08:59:39 +0000
(08:59 +0000)
Now that pp_return() protects its return arg(s) against premature freeing
before calling dounwind(), there's no need for POPLOOP to mortalise the
current item.
cop.h
patch
|
blob
|
blame
|
history
diff --git
a/cop.h
b/cop.h
index
e430201
..
5cf5a30
100644
(file)
--- a/
cop.h
+++ b/
cop.h
@@
-845,8
+845,7
@@
struct block_loop {
cursv = *svp; \
*svp = cx->blk_loop.itersave; \
} \
- /* delayed rc-- in case of "for $x (...) { return $x }" */ \
- sv_2mortal(cursv); \
+ SvREFCNT_dec(cursv); \
} \
/* given/when context */