summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorRuslan Zakirov <ruz@bestpractical.com>2012-10-13 21:27:12 +0400
committerFather Chrysostomos <sprout@cpan.org>2012-12-11 08:59:41 -0800
commita88bf2bcaa12203b1be20c254990b132faf927dd (patch)
treebe3daa8d46f9eaf5e418e2a27d261ae5633b484d /pp_hot.c
parentb1babc516d40c1a9d24a2eabf3c7649c4c3e7a00 (diff)
downloadperl-a88bf2bcaa12203b1be20c254990b132faf927dd.tar.gz
we need duplicates counter only in list context
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 47b3a7badb..14b2878b80 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1092,12 +1092,11 @@ PP(pp_aassign)
if (*relem)
sv_setsv(tmpstr,*relem); /* value */
relem++;
- if (gimme != G_VOID) {
+ if (gimme == G_ARRAY) {
if (hv_exists_ent(hash, sv, 0))
/* key overwrites an existing entry */
duplicates += 2;
- else
- if (gimme == G_ARRAY) {
+ else {
/* copy element back: possibly to an earlier
* stack location if we encountered dups earlier */
*topelem++ = sv;