summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-05-06 16:46:21 +0100
committerDamien George <damien.p.george@gmail.com>2015-05-06 16:46:21 +0100
commit57ebe1b27d6ae10584d3b5f767e3cc5aa481c0b0 (patch)
treefc398ab877ad426c16be913069ff42a0078a7276
parent28076f3d4b3bf58aa86d6346af88665f7e5c6031 (diff)
downloadmicropython-57ebe1b27d6ae10584d3b5f767e3cc5aa481c0b0.tar.gz
micropython-57ebe1b27d6ae10584d3b5f767e3cc5aa481c0b0.zip
unix-cpy: Fix adjustment of stack size when leaving exception handler.
Also remove __debug__ from one of the bytecode tests.
-rw-r--r--py/emitcpy.c2
-rw-r--r--tests/bytecode/pylib-tests/compileall.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/py/emitcpy.c b/py/emitcpy.c
index 48c293091c..dc96c529fb 100644
--- a/py/emitcpy.c
+++ b/py/emitcpy.c
@@ -782,7 +782,7 @@ STATIC void emit_cpy_start_except_handler(emit_t *emit) {
}
STATIC void emit_cpy_end_except_handler(emit_t *emit) {
- emit_cpy_adjust_stack_size(emit, -5); // stack adjust
+ emit_cpy_adjust_stack_size(emit, -2); // stack adjust
}
STATIC void emit_cpy_load_const_verbatim_strn(emit_t *emit, const char *str, mp_uint_t len) {
diff --git a/tests/bytecode/pylib-tests/compileall.py b/tests/bytecode/pylib-tests/compileall.py
index d3cff6a98a..d92a322cf6 100644
--- a/tests/bytecode/pylib-tests/compileall.py
+++ b/tests/bytecode/pylib-tests/compileall.py
@@ -88,7 +88,7 @@ def compile_file(fullname, ddir=None, force=False, rx=None, quiet=False,
return success
if os.path.isfile(fullname):
if legacy:
- cfile = fullname + ('c' if __debug__ else 'o')
+ cfile = fullname + 'c'
else:
if optimize >= 0:
cfile = imp.cache_from_source(fullname,