Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
pyodide
Commits
93469d29
Commit
93469d29
authored
Apr 16, 2018
by
Michael Droettboom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #21: Make numpy.fft work
parent
d1cb952a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
Makefile
Makefile
+2
-1
numpy/Makefile
numpy/Makefile
+2
-1
numpy/patches/force_malloc.patch
numpy/patches/force_malloc.patch
+24
-0
No files found.
Makefile
View file @
93469d29
...
...
@@ -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
...
...
numpy/Makefile
View file @
93469d29
...
...
@@ -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
:
...
...
numpy/patches/force_malloc.patch
0 → 100644
View file @
93469d29
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();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment