summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-11-09 03:09:42 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-11-09 03:09:42 +0000
commit19287ca4b6606f7112d4cd6a2d67ac46292f9158 (patch)
treea8c725581153676374bb1dae1d6a3e6532da1bb4 /numpy
parentba4fd564280dfe2263c6da554f5af2ef304df37b (diff)
downloadnumpy-19287ca4b6606f7112d4cd6a2d67ac46292f9158.tar.gz
ENH: put all mandatory headers for npymath in one common header.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/npymath/ieee754.c7
-rw-r--r--numpy/core/src/npymath/npy_math.c.src7
-rw-r--r--numpy/core/src/npymath/npy_math_common.h8
-rw-r--r--numpy/core/src/npymath/npy_math_complex.c.src8
-rw-r--r--numpy/core/src/npymath/npy_math_private.h3
5 files changed, 12 insertions, 21 deletions
diff --git a/numpy/core/src/npymath/ieee754.c b/numpy/core/src/npymath/ieee754.c
index 833581eb5..902e8919b 100644
--- a/numpy/core/src/npymath/ieee754.c
+++ b/numpy/core/src/npymath/ieee754.c
@@ -1,12 +1,7 @@
/*
* Low-level routines related to IEEE-754 format
*/
-#include <Python.h>
-#include <math.h>
-
-#include "npy_config.h"
-#include "numpy/npy_math.h"
-
+#include "npy_math_common.h"
#include "npy_math_private.h"
#ifndef HAVE_COPYSIGN
diff --git a/numpy/core/src/npymath/npy_math.c.src b/numpy/core/src/npymath/npy_math.c.src
index 951668fbb..33c8c0a01 100644
--- a/numpy/core/src/npymath/npy_math.c.src
+++ b/numpy/core/src/npymath/npy_math.c.src
@@ -53,13 +53,6 @@
* is preserved.
* ====================================================
*/
-
-#include <Python.h>
-#include <math.h>
-
-#include "npy_config.h"
-#include "numpy/npy_math.h"
-
#include "npy_math_private.h"
/*
diff --git a/numpy/core/src/npymath/npy_math_common.h b/numpy/core/src/npymath/npy_math_common.h
new file mode 100644
index 000000000..0705ea323
--- /dev/null
+++ b/numpy/core/src/npymath/npy_math_common.h
@@ -0,0 +1,8 @@
+/*
+ * Common headers needed by every npy math compilation unit
+ */
+#include <Python.h>
+#include <math.h>
+
+#include "npy_config.h"
+#include "numpy/npy_math.h"
diff --git a/numpy/core/src/npymath/npy_math_complex.c.src b/numpy/core/src/npymath/npy_math_complex.c.src
index a01d6070a..583328782 100644
--- a/numpy/core/src/npymath/npy_math_complex.c.src
+++ b/numpy/core/src/npymath/npy_math_complex.c.src
@@ -28,13 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-#include <Python.h>
-#include <math.h>
-#include <float.h>
-
-#include "config.h"
-#include "numpy/npy_math.h"
-
+#include "npy_math_common.h"
#include "npy_math_private.h"
/*==========================================================
diff --git a/numpy/core/src/npymath/npy_math_private.h b/numpy/core/src/npymath/npy_math_private.h
index b0612460c..57055e60f 100644
--- a/numpy/core/src/npymath/npy_math_private.h
+++ b/numpy/core/src/npymath/npy_math_private.h
@@ -21,8 +21,9 @@
#include <Python.h>
#include <math.h>
-#include "config.h"
+#include "npy_config.h"
#include "numpy/npy_math.h"
+#include "numpy/npy_cpu.h"
#include "numpy/npy_endian.h"
#include "numpy/npy_common.h"