summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-05-02 21:04:32 +0100
committerNicholas Clark <nick@ccl4.org>2010-05-02 21:04:32 +0100
commit4f0556e9541e0e65f0abc5f4f6caf1f16ddf2dcd (patch)
treea5200bd223c9e2ff7d76095c4ea7d95101399008 /pp_hot.c
parent61e5f455dc8214c9c23deb700f3fcf67b180afa5 (diff)
downloadperl-4f0556e9541e0e65f0abc5f4f6caf1f16ddf2dcd.tar.gz
Permit array assignment to steal temps and copy shared hash key scalars.
Scalar assignment to array elements already does this. (As does all other scalar assignment, and list assignment to hashes.) Prior to 4c8f17b905f2 (change 7867) list assignment to arrays did steal temps.
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 95a682270c..ea949b828e 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1037,7 +1037,8 @@ PP(pp_aassign)
while (relem <= lastrelem) { /* gobble up all the rest */
SV **didstore;
assert(*relem);
- sv = newSVsv(*relem);
+ sv = newSV(0);
+ sv_setsv(sv, *relem);
*(relem++) = sv;
didstore = av_store(ary,i++,sv);
if (magic) {