[Python-checkins] r68311 - python/trunk/Include/pymath.h
mark.dickinson
python-checkins at python.org
Sun Jan 4 20:53:00 CET 2009
Author: mark.dickinson
Date: Sun Jan 4 20:53:00 2009
New Revision: 68311
Log:
Use C99 'isfinite' macro in preference to BSD-derived 'finite' function.
Modified:
python/trunk/Include/pymath.h
Modified: python/trunk/Include/pymath.h
==============================================================================
--- python/trunk/Include/pymath.h (original)
+++ python/trunk/Include/pymath.h Sun Jan 4 20:53:00 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