[Python-checkins] r60414 - in python/branches/trunk-math: Include/pymath.h Modules/mathmodule.c Objects/floatobject.c

christian.heimes python-checkins at python.org
Tue Jan 29 16:16:45 CET 2008


Author: christian.heimes
Date: Tue Jan 29 16:16:45 2008
New Revision: 60414

Modified:
   python/branches/trunk-math/Include/pymath.h
   python/branches/trunk-math/Modules/mathmodule.c
   python/branches/trunk-math/Objects/floatobject.c
Log:
Move all external and math related declarations into pymath.h

Modified: python/branches/trunk-math/Include/pymath.h
==============================================================================
--- python/branches/trunk-math/Include/pymath.h	(original)
+++ python/branches/trunk-math/Include/pymath.h	Tue Jan 29 16:16:45 2008
@@ -49,9 +49,16 @@
 extern double frexp (double, int *);
 extern double ldexp (double, int);
 extern double modf (double, double *);
+extern double pow(double, double);
 #endif /* __STDC__ */
 #endif /* _MSC_VER */
 
+#ifdef _OSF_SOURCE
+/* OSF1 5.1 doesn't make these available with XOPEN_SOURCE_EXTENDED defined */
+extern int finite(double);
+extern double copysign(double, double);
+#endif
+
 /* High precision defintion of pi and e (Euler)
  * The values are taken from libc6's math.h.
  */

Modified: python/branches/trunk-math/Modules/mathmodule.c
==============================================================================
--- python/branches/trunk-math/Modules/mathmodule.c	(original)
+++ python/branches/trunk-math/Modules/mathmodule.c	Tue Jan 29 16:16:45 2008
@@ -55,11 +55,6 @@
 #include "Python.h"
 #include "longintrepr.h" /* just for SHIFT */
 
-#ifdef _OSF_SOURCE
-/* OSF1 5.1 doesn't make this available with XOPEN_SOURCE_EXTENDED defined */
-extern double copysign(double, double);
-#endif
-
 /* Call is_error when errno != 0, and where x is the result libm
  * returned.  is_error will usually set up an exception and return
  * true (1), but may return false (0) without setting up an exception.

Modified: python/branches/trunk-math/Objects/floatobject.c
==============================================================================
--- python/branches/trunk-math/Objects/floatobject.c	(original)
+++ python/branches/trunk-math/Objects/floatobject.c	Tue Jan 29 16:16:45 2008
@@ -10,17 +10,6 @@
 #include <ctype.h>
 #include <float.h>
 
-
-#if !defined(__STDC__)
-extern double fmod(double, double);
-extern double pow(double, double);
-#endif
-
-#ifdef _OSF_SOURCE
-/* OSF1 5.1 doesn't make this available with XOPEN_SOURCE_EXTENDED defined */
-extern int finite(double);
-#endif
-
 /* Special free list -- see comments for same code in intobject.c. */
 #define BLOCK_SIZE	1000	/* 1K less typical malloc overhead */
 #define BHEAD_SIZE	8	/* Enough for a 64-bit pointer */


More information about the Python-checkins mailing list