summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-07-02 18:25:48 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-07-25 23:48:02 -0700
commitc902d85e7652ab578dceefc793d634241321e990 (patch)
treee44dce312fc74303cb8b597cb352051e90a8f127 /pad.c
parent5d7191988b7898f8bbf2cb7fe55bcad6416c3e9c (diff)
downloadperl-c902d85e7652ab578dceefc793d634241321e990.tar.gz
pad.c: Don’t copy shared hash key targets when cloning
When creating a new thread, don’t treat shared hash key targets as constants. (See the previous commit for explanation.) This should cause no change in behaviour, because the new target will not be in use, and its next use will immediately overwrite its value. It just saves having to copy a string that will be overwritten.
Diffstat (limited to 'pad.c')
-rw-r--r--pad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pad.c b/pad.c
index e44083b01e..082dc662f9 100644
--- a/pad.c
+++ b/pad.c
@@ -2445,7 +2445,7 @@ Perl_padlist_dup(pTHX_ PADLIST *srcpad, CLONE_PARAMS *param)
}
}
}
- else if (IS_PADGV(oldpad[ix]) || IS_PADCONST(oldpad[ix])) {
+ else if (IS_PADGV(oldpad[ix]) || PadnamePV(names[ix])) {
pad1a[ix] = sv_dup_inc(oldpad[ix], param);
}
else {