This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Cast markstack values to I32
[perl5.git] / XSUB.h
diff --git a/XSUB.h b/XSUB.h
index f7d04a8..bff12e3 100644 (file)
--- a/XSUB.h
+++ b/XSUB.h
@@ -115,13 +115,13 @@ is a lexical $_ in scope.
 #  endif
 #endif
 
-#define dAX const I32 ax = MARK - PL_stack_base + 1
+#define dAX const I32 ax = (I32)(MARK - PL_stack_base + 1)
 
 #define dAXMARK                                \
        I32 ax = POPMARK;       \
        register SV **mark = PL_stack_base + ax++
 
-#define dITEMS I32 items = SP - MARK
+#define dITEMS I32 items = (I32)(SP - MARK)
 
 #if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */
 #  define dXSARGS \