[Python-checkins] r68341 - in python/branches/py3k: Include/pymath.h

mark.dickinson python-checkins at python.org
Mon Jan 5 18:08:27 CET 2009


Author: mark.dickinson
Date: Mon Jan  5 18:08:27 2009
New Revision: 68341

Log:
Merged revisions 68311 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68311 | mark.dickinson | 2009-01-04 19:53:00 +0000 (Sun, 04 Jan 2009) | 2 lines
  
  Use C99 'isfinite' macro in preference to BSD-derived 'finite' function.
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Include/pymath.h

Modified: python/branches/py3k/Include/pymath.h
==============================================================================
--- python/branches/py3k/Include/pymath.h	(original)
+++ python/branches/py3k/Include/pymath.h	Mon Jan  5 18:08:27 2009
@@ -118,7 +118,9 @@
  * Note: PC/pyconfig.h defines Py_IS_FINITE as _finite
  */
 #ifndef Py_IS_FINITE
-#ifdef HAVE_FINITE
+#if defined HAVE_DECL_ISFINITE && HAVE_DECL_ISFINITE == 1
+#define Py_IS_FINITE(X) isfinite(X)
+#elif defined HAVE_FINITE
 #define Py_IS_FINITE(X) finite(X)
 #else
 #define Py_IS_FINITE(X) (!Py_IS_INFINITY(X) && !Py_IS_NAN(X))


More information about the Python-checkins mailing list