summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-11-23 14:51:21 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-11-30 11:48:37 -0800
commit09c676d973b724f9d8bc07dbb1b115dd8920d5f5 (patch)
tree54eb48a3c2432ebf66532d9a6a9cb8cbb18d3bd4 /pad.c
parent9b7476d7a269a4d9bb24393ae5c8d75efe2fcab4 (diff)
downloadperl-09c676d973b724f9d8bc07dbb1b115dd8920d5f5.tar.gz
pad.c:padlist_dup: Remove refcnt check
This was added by 6de654a5, and the assert that makes sure the reference count is exactly 1 was added in the same commit. After several years, I think we can be sure now that the reference count is indeed always 1. We don’t need to ‘play it safe’ for non-debug- ging builds.
Diffstat (limited to 'pad.c')
-rw-r--r--pad.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pad.c b/pad.c
index 88dd981c1e..343383bbb7 100644
--- a/pad.c
+++ b/pad.c
@@ -2494,8 +2494,7 @@ Perl_padlist_dup(pTHX_ PADLIST *srcpad, CLONE_PARAMS *param)
PERL_ARGS_ASSERT_PADLIST_DUP;
- cloneall = param->flags & CLONEf_COPY_STACKS
- || SvREFCNT(PadlistARRAY(srcpad)[1]) > 1;
+ cloneall = param->flags & CLONEf_COPY_STACKS;
assert (SvREFCNT(PadlistARRAY(srcpad)[1]) == 1);
max = cloneall ? PadlistMAX(srcpad) : 1;