[Python-checkins] r86320 - python/branches/py3k-cdecimal/setup.py

stefan.krah python-checkins at python.org
Mon Nov 8 15:25:30 CET 2010


Author: stefan.krah
Date: Mon Nov  8 15:25:29 2010
New Revision: 86320

Log:
Drop mixed 64-bit/CONFIG_32 option. Use ANSI C double width multiplication
and division instead. This is faster and maintenance gets easier.



Modified:
   python/branches/py3k-cdecimal/setup.py

Modified: python/branches/py3k-cdecimal/setup.py
==============================================================================
--- python/branches/py3k-cdecimal/setup.py	(original)
+++ python/branches/py3k-cdecimal/setup.py	Mon Nov  8 15:25:29 2010
@@ -1754,7 +1754,6 @@
           'cdecimal/numbertheory.c',
           'cdecimal/sixstep.c',
           'cdecimal/transpose.c',
-          'cdecimal/transpose3.c'
         ]
         depends = [
           'cdecimal/basearith.h',
@@ -1784,21 +1783,22 @@
         sizeof_size_t = sysconfig.get_config_var('SIZEOF_SIZE_T')
         if sizeof_size_t == 8:
             if sysconfig.get_config_var('HAVE_GCC_ASM_FOR_X64'):
-                define_macros = [('CONFIG_64', '1')]
+                define_macros = [('CONFIG_64', '1'), ('ASM', '1')]
             elif sysconfig.get_config_var('HAVE_GCC_UINT128_T'):
-                define_macros = [('CONFIG_64', '1'), ('HAVE_UINT128_T', '1')]
+                define_macros = [('CONFIG_64', '1'), ('ANSI', '1'),
+                                 ('HAVE_UINT128_T', '1')]
             else:
-                define_macros = [('CONFIG_32', '1'), ('ANSI', '1')]
+                define_macros = [('CONFIG_64', '1'), ('ANSI', '1')]
         elif sizeof_size_t == 4:
-            define_macros = [('CONFIG_32', '1')]
             ppro = sysconfig.get_config_var('HAVE_GCC_ASM_FOR_X87')
             if ppro and ('gcc' in cc or 'clang' in cc) and \
                platform != 'darwin':
-                # XXX icc >= 11.0 works as well.
-                # XXX darwin: problems with global constant in inline asm.
-                define_macros.append(('PPRO', '1'))
+                # darwin: problems with global constant in inline asm.
+                # icc >= 11.0 works as well.
+                define_macros = [('CONFIG_32', '1'), ('PPRO', '1'),
+                                 ('ASM', '1')]
             else:
-                define_macros.append(('ANSI', '1'))
+                define_macros = [('CONFIG_32', '1'), ('ANSI', '1')]
         else:
             raise DistutilsError("cdecimal: unsupported architecture")
         # Faster version without thread local contexts:


More information about the Python-checkins mailing list