summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-21 01:18:05 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-21 01:18:05 +0100
commit0ae21a81f70806afc6f96fe099083bc8273ab34c (patch)
treec8e4680b545c720ca28e6a142702ef2f5909f5d7 /py
parent3771a097dac8baaf6dc8a9618dc8a1074a43c439 (diff)
parent521de04ce2dc7048afbdb2445979a203512b13e2 (diff)
Merge branch 'master' of github.com:micropython/micropython
Diffstat (limited to 'py')
-rw-r--r--py/builtinimport.c4
-rw-r--r--py/nlrx86.S4
-rw-r--r--py/objfun.c4
3 files changed, 12 insertions, 0 deletions
diff --git a/py/builtinimport.c b/py/builtinimport.c
index 262ee04a5..4a2f6510c 100644
--- a/py/builtinimport.c
+++ b/py/builtinimport.c
@@ -3,6 +3,10 @@
#include <stdio.h>
#include <string.h>
#include <assert.h>
+#ifdef __MINGW32__
+// For alloca()
+#include <malloc.h>
+#endif
#include "nlr.h"
#include "misc.h"
diff --git a/py/nlrx86.S b/py/nlrx86.S
index 003de5095..145bdb9da 100644
--- a/py/nlrx86.S
+++ b/py/nlrx86.S
@@ -61,7 +61,11 @@ nlr_jump:
#endif
mov nlr_top, %edx # load nlr_top
test %edx, %edx # check for nlr_top being NULL
+#ifdef _WIN32
+ je _nlr_jump_fail # fail if nlr_top is NULL
+#else
je nlr_jump_fail # fail if nlr_top is NULL
+#endif
mov 4(%esp), %eax # load return value
mov %eax, 4(%edx) # store return value
mov (%edx), %eax # load prev nlr_top
diff --git a/py/objfun.c b/py/objfun.c
index c7144f307..940b64a66 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -2,6 +2,10 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
+#ifdef __MINGW32__
+// For alloca()
+#include <malloc.h>
+#endif
#include "nlr.h"
#include "misc.h"