summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorVincent Pit <perl@profvince.com>2012-06-22 19:21:50 +0200
committerVincent Pit <perl@profvince.com>2012-06-22 19:21:50 +0200
commit3565fbf321fb95d8363f9fd24673f1f135265f89 (patch)
tree309ce3b50af002bb06a5e4a7112e23133d333e79 /mg.c
parent83f29afad70b612d23a170f28fca57f0c8ca24af (diff)
downloadperl-3565fbf321fb95d8363f9fd24673f1f135265f89.tar.gz
Also handle the case IVSIZE == I32SIZE when resetting the array iterator
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mg.c b/mg.c
index 4d6df84d4f..8cfee10824 100644
--- a/mg.c
+++ b/mg.c
@@ -2051,8 +2051,12 @@ Perl_magic_cleararylen_p(pTHX_ SV *sv, MAGIC *mg)
PERL_UNUSED_ARG(sv);
/* Reset the iterator when the array is cleared */
+#if IVSIZE == I32SIZE
+ *((IV *) &(mg->mg_len)) = 0;
+#else
if (mg->mg_ptr)
*((IV *) mg->mg_ptr) = 0;
+#endif
return 0;
}