[Python-checkins] r71325 - python/branches/py3k-short-float-repr/Python/dtoa.c

mark.dickinson python-checkins at python.org
Mon Apr 6 23:05:19 CEST 2009


Author: mark.dickinson
Date: Mon Apr  6 23:05:18 2009
New Revision: 71325

Log:
Fix up integer defines


Modified:
   python/branches/py3k-short-float-repr/Python/dtoa.c

Modified: python/branches/py3k-short-float-repr/Python/dtoa.c
==============================================================================
--- python/branches/py3k-short-float-repr/Python/dtoa.c	(original)
+++ python/branches/py3k-short-float-repr/Python/dtoa.c	Mon Apr  6 23:05:18 2009
@@ -101,7 +101,6 @@
  */
 
 /*
- * #define Long int on machines with 32-bit ints and 64-bit longs.
  * #define Honor_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3
  *	and strtod and dtoa should round accordingly.  Unless Trust_FLT_ROUNDS
  *	is also #defined, fegetround() will be queried for the rounding mode.
@@ -132,18 +131,17 @@
 #error "Exactly one of IEEE_8087 or IEEE_MC68k should be defined."
 #endif
 
-#if SIZEOF_LONG==8 && SIZEOF_INT==4
-typedef int Long;
-typedef unsigned int ULong;
-#elif SIZEOF_LONG==4
-typedef long Long;
-typedef unsigned long ULong;
+#if defined(HAVE_UINT32_T) && defined(HAVE_INT32_T)
+typedef PY_UINT32_T ULong;
+typedef PY_INT32_T Long;
 #else
 #error "Failed to find an exact-width 32-bit integer type"
 #endif
 
-#ifndef HAVE_LONG_LONG
-#define NO_LONG_LONG
+#if defined(HAVE_UINT64_T)
+#define ULLong PY_UINT64_T
+#else
+#undef ULLong
 #endif
 
 #undef DEBUG
@@ -261,17 +259,6 @@
 
 #define FFFFFFFF 0xffffffffUL
 
-#ifdef NO_LONG_LONG
-#undef ULLong
-#else	/* long long available */
-#ifndef Llong
-#define Llong long long
-#endif
-#ifndef ULLong
-#define ULLong unsigned Llong
-#endif
-#endif /* NO_LONG_LONG */
-
 #define Kmax 7
 
  struct


More information about the Python-checkins mailing list