[pypy-svn] r54537 - pypy/dist/pypy/translator/c/src

arigo at codespeak.net arigo at codespeak.net
Wed May 7 18:46:08 CEST 2008


Author: arigo
Date: Wed May  7 18:46:06 2008
New Revision: 54537

Modified:
   pypy/dist/pypy/translator/c/src/int.h
Log:
64-bit fixes.


Modified: pypy/dist/pypy/translator/c/src/int.h
==============================================================================
--- pypy/dist/pypy/translator/c/src/int.h	(original)
+++ pypy/dist/pypy/translator/c/src/int.h	Wed May  7 18:46:06 2008
@@ -72,7 +72,13 @@
 
 #define OP_INT_MUL(x,y,r)     r = (x) * (y)
 
-#ifndef HAVE_LONG_LONG
+#if defined(HAVE_LONG_LONG) && SIZE_OF_LONG_LONG < SIZE_OF_LONG
+#  define OP_INT_MUL_OVF_LL      1
+#lse
+#  define OP_INT_MUL_OVF_LL      0
+#endif
+
+#if !OP_INT_MUL_OVF_LL
 
 #define OP_INT_MUL_OVF(x,y,r) \
 	if (op_int_mul_ovf(x,y,&r)); \
@@ -230,7 +236,7 @@
 
 /* _________________ certain implementations __________________ */
 
-#ifndef HAVE_LONG_LONG
+#if !OP_INT_MUL_OVF_LL
 /* adjusted from intobject.c, Python 2.3.3 */
 
 /* prototypes */
@@ -276,7 +282,7 @@
 
 #endif /* PYPY_NOT_MAIN_FILE */
 
-#endif /* HAVE_LONG_LONG */
+#endif /* !OP_INT_MUL_OVF_LL */
 
 /* implementations */
 



More information about the Pypy-commit mailing list