[Numpy-svn] r8657 - trunk/numpy/core

numpy-svn@scip... numpy-svn@scip...
Fri Aug 20 21:32:19 CDT 2010


Author: cdavid
Date: 2010-08-20 21:32:18 -0500 (Fri, 20 Aug 2010)
New Revision: 8657

Modified:
   trunk/numpy/core/setup.py
Log:
BUG: fix re-declaration of already defined macros in python.h.

Modified: trunk/numpy/core/setup.py
===================================================================
--- trunk/numpy/core/setup.py	2010-08-21 02:01:23 UTC (rev 8656)
+++ trunk/numpy/core/setup.py	2010-08-21 02:32:18 UTC (rev 8657)
@@ -215,12 +215,12 @@
     _macros = ["isnan", "isinf", "signbit", "isfinite"]
     if sys.version_info[:2] >= (2, 6):
         for f in _macros:
-            st = config.check_decl(fname2def("decl_%s" % f),
+            already_declared = config.check_decl(fname2def("decl_%s" % f),
                     headers=["Python.h", "math.h"])
-            if not st:
+            if already_declared:
+                pub.append('NPY_%s' % fname2def("decl_%s" % f))
+            else:
                 macros.append(f)
-            else:
-                _add_decl(f)
     else:
         macros = _macros[:]
     # Normally, isnan and isinf are macro (C99), but some platforms only have



More information about the Numpy-svn mailing list