Commit 93469d29 authored by Michael Droettboom's avatar Michael Droettboom

Fix #21: Make numpy.fft work

parent d1cb952a
......@@ -30,7 +30,8 @@ NUMPY_LIBS=\
$(NUMPY_ROOT)/core/umath.so \
$(NUMPY_ROOT)/linalg/lapack_lite.so \
$(NUMPY_ROOT)/linalg/_umath_linalg.so \
$(NUMPY_ROOT)/random/mtrand.so
$(NUMPY_ROOT)/random/mtrand.so \
$(NUMPY_ROOT)/fft/fftpack_lite.so
SITEPACKAGES=root/lib/python$(PYMINOR)/site-packages
......
......@@ -54,7 +54,8 @@ all: \
$(BUILDCORE)/umath.so \
$(BUILDLINALG)/lapack_lite.so \
$(BUILDLINALG)/_umath_linalg.so \
$(BUILDRANDOM)/mtrand.so
$(BUILDRANDOM)/mtrand.so \
$(BUILDFFT)/fftpack_lite.so
clean:
......
diff --git a/numpy/fft/fftpack_litemodule.c b/numpy/fft/fftpack_litemodule.c
index dfa0d211b..0bdf709c5 100644
--- a/numpy/fft/fftpack_litemodule.c
+++ b/numpy/fft/fftpack_litemodule.c
@@ -328,6 +328,8 @@ static struct PyModuleDef moduledef = {
};
#endif
+static volatile int *_dummy_malloc;
+
/* Initialization function for the module */
#if PY_MAJOR_VERSION >= 3
#define RETVAL m
@@ -349,6 +351,10 @@ initfftpack_lite(void)
(PyObject*)NULL,PYTHON_API_VERSION);
#endif
+ _dummy_malloc = malloc(sizeof(int));
+ *_dummy_malloc = 1;
+ free((void *)_dummy_malloc);
+
/* Import the array object */
import_array();
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment