From 3565fbf321fb95d8363f9fd24673f1f135265f89 Mon Sep 17 00:00:00 2001 From: Vincent Pit Date: Fri, 22 Jun 2012 19:21:50 +0200 Subject: [PATCH] Also handle the case IVSIZE == I32SIZE when resetting the array iterator --- mg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mg.c b/mg.c index 4d6df84..8cfee10 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; } -- 2.7.4