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

numpy-svn at scipy.org numpy-svn at scipy.org
Thu Feb 26 06:44:19 EST 2009


Author: cdavid
Date: 2009-02-26 05:44:14 -0600 (Thu, 26 Feb 2009)
New Revision: 6484

Modified:
   trunk/numpy/core/setup.py
Log:
Fix typo which caused PY_LONG_LONG sizeof to be defined with the wrong size.

Modified: trunk/numpy/core/setup.py
===================================================================
--- trunk/numpy/core/setup.py	2009-02-26 10:47:29 UTC (rev 6483)
+++ trunk/numpy/core/setup.py	2009-02-26 11:44:14 UTC (rev 6484)
@@ -167,9 +167,12 @@
 
     # We check declaration AND type because that's how distutils does it.
     if config_cmd.check_decl('PY_LONG_LONG', headers=['Python.h']):
-        st = config_cmd.check_type_size('PY_LONG_LONG',  headers=['Python.h'], library_dirs=[pythonlib_dir()])
-        assert not st == 0
-        private_defines.append(('SIZEOF_%s' % sym2def('PY_LONG_LONG'), '%d' % res))
+        res = config_cmd.check_type_size('PY_LONG_LONG',  headers=['Python.h'],
+                library_dirs=[pythonlib_dir()])
+        if res >= 0:
+            private_defines.append(('SIZEOF_%s' % sym2def('PY_LONG_LONG'), '%d' % res))
+        else:
+            raise SystemError("Checking sizeof (%s) failed !" % 'PY_LONG_LONG')
 
     if not config_cmd.check_decl('CHAR_BIT', headers=['Python.h']):
         raise RuntimeError(




More information about the Numpy-svn mailing list