[Python-checkins] r70812 - python/branches/py3k-short-float-repr/Python/dtoa.c
mark.dickinson
python-checkins at python.org
Tue Mar 31 16:17:58 CEST 2009
Author: mark.dickinson
Date: Tue Mar 31 16:17:58 2009
New Revision: 70812
Log:
Hook up Python's defines to the dtoa.c defines for integer types.
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 Tue Mar 31 16:17:58 2009
@@ -194,13 +194,23 @@
#define IEEE_8087
#endif
-#ifndef Long
-#define Long long
+#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;
+#else
+#error "Failed to find an exact-width 32-bit integer type"
#endif
-#ifndef ULong
-typedef unsigned Long ULong;
+
+#ifndef HAVE_LONG_LONG
+#define NO_LONG_LONG
#endif
+/* End Python #define linking */
+
+
#ifdef DEBUG
#include "stdio.h"
#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
More information about the Python-checkins
mailing list