diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-05-03 14:39:47 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-05-03 14:39:47 +0300 |
commit | 7a1402260415ab064a1c0ee7bc9b666832c244b2 (patch) | |
tree | 2039176e5c3bed83406d74140d15f32d3b37bbe3 | |
parent | d51dbeb19090cd69a93295f69205295887e3d856 (diff) | |
parent | 98e2ee0ec184c4c41cd0b6a633fe75a1fe40f8d3 (diff) | |
download | micropython-7a1402260415ab064a1c0ee7bc9b666832c244b2.tar.gz micropython-7a1402260415ab064a1c0ee7bc9b666832c244b2.zip |
Merge pull request #552 from stinos/mingw-alloca
py: Use <alloca.h> for alloca()
-rw-r--r-- | py/builtinimport.c | 6 | ||||
-rw-r--r-- | py/objfun.c | 6 | ||||
-rw-r--r-- | windows/alloca.h | 1 |
3 files changed, 3 insertions, 10 deletions
diff --git a/py/builtinimport.c b/py/builtinimport.c index 323b63ef61..f4e089b5d8 100644 --- a/py/builtinimport.c +++ b/py/builtinimport.c @@ -1,12 +1,8 @@ #include <stdint.h> -#include <stdlib.h> #include <stdio.h> #include <string.h> #include <assert.h> -#ifdef __MINGW32__ -// For alloca() -#include <malloc.h> -#endif +#include <alloca.h> #include "mpconfig.h" #include "nlr.h" diff --git a/py/objfun.c b/py/objfun.c index 37fe809658..4690dc6c88 100644 --- a/py/objfun.c +++ b/py/objfun.c @@ -1,11 +1,7 @@ #include <stdbool.h> -#include <stdlib.h> #include <string.h> #include <assert.h> -#ifdef __MINGW32__ -// For alloca() -#include <malloc.h> -#endif +#include <alloca.h> #include "mpconfig.h" #include "nlr.h" diff --git a/windows/alloca.h b/windows/alloca.h new file mode 100644 index 0000000000..f8fa6f17a0 --- /dev/null +++ b/windows/alloca.h @@ -0,0 +1 @@ +#include <malloc.h>
|