summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mg.c b/mg.c
index a13394337f..a359ebfcca 100644
--- a/mg.c
+++ b/mg.c
@@ -2184,12 +2184,12 @@ Perl_magic_cleararylen_p(pTHX_ SV *sv, MAGIC *mg)
PERL_UNUSED_CONTEXT;
/* 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
+ if (sizeof(IV) == sizeof(SSize_t)) {
+ *((IV *) &(mg->mg_len)) = 0;
+ } else {
+ if (mg->mg_ptr)
+ *((IV *) mg->mg_ptr) = 0;
+ }
return 0;
}