summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2008-11-22 07:54:48 +0000
committerCharles Harris <charlesr.harris@gmail.com>2008-11-22 07:54:48 +0000
commitbc42c6b084f9b596d7a35a417b3a3bb6f2ef55e0 (patch)
tree0d9132dc5551a7c921616f56ec6dde4614063462
parenta0d20a59b6cbabd60ec351d019c3bcd48df98398 (diff)
downloadnumpy-bc42c6b084f9b596d7a35a417b3a3bb6f2ef55e0.tar.gz
Add some cautionary comments.
-rw-r--r--numpy/core/src/umathmodule.c.src17
1 files changed, 15 insertions, 2 deletions
diff --git a/numpy/core/src/umathmodule.c.src b/numpy/core/src/umathmodule.c.src
index 0d73e0b61..afbe846ae 100644
--- a/numpy/core/src/umathmodule.c.src
+++ b/numpy/core/src/umathmodule.c.src
@@ -9,12 +9,24 @@
** INCLUDES **
*****************************************************************************
*/
+
+/*
+ * _UMATHMODULE IS needed in __ufunc_api.h, included from numpy/ufuncobject.h.
+ * This is a mess and it would be nice to fix it. It has nothing to do with
+ * __ufunc_api.c
+ */
+#define _UMATHMODULE
+
#include "Python.h"
#include "numpy/noprefix.h"
-#define _UMATHMODULE /* needed in one of the numpy include files */
#include "numpy/ufuncobject.h"
#include "abstract.h"
#include "config.h"
+
+/*
+ * Looks like some versions of Python.h do naughty things, so math.h needs
+ * to come after.
+ */
#include <math.h>
/*
@@ -113,7 +125,7 @@ InitOtherOperators(PyObject *dictionary) {
return;
}
-/* Setup +inf and +0 */
+/* Setup +inf and +0 */
static double
pinf_init(void)
@@ -148,6 +160,7 @@ pzero_init(void)
}
/* Setup the umath module */
+static PyTypeObject PyUFunc_Type;
static struct PyMethodDef methods[] = {
{"frompyfunc", (PyCFunction) ufunc_frompyfunc,