summaryrefslogtreecommitdiff
path: root/lib/utils
diff options
context:
space:
mode:
authorsommersoft <sommersoft@gmail.com>2019-07-31 16:44:43 -0500
committersommersoft <sommersoft@gmail.com>2019-07-31 16:44:43 -0500
commit9939d0c4f49db084f52a12b6ea5f6ce97b614146 (patch)
tree6c338f9e01c581793255757b4483d3d88824095f /lib/utils
parenta498bcd94d7f869e2cb2e992babacb981de688c0 (diff)
parent366fdcce18e148a6828b7a7074e1e4198fca3595 (diff)
Merge branch 'master' of https://github.com/adafruit/circuitpython into mixer_voice
Diffstat (limited to 'lib/utils')
-rw-r--r--lib/utils/printf.c4
-rwxr-xr-xlib/utils/pyexec.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/utils/printf.c b/lib/utils/printf.c
index e19da2dc0..3a4cc2549 100644
--- a/lib/utils/printf.c
+++ b/lib/utils/printf.c
@@ -103,9 +103,11 @@ STATIC void strn_print_strn(void *data, const char *str, size_t len) {
strn_print_env->remain -= len;
}
-#if defined(__GNUC__) && !defined(__clang__)
+#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9
// uClibc requires this alias to be defined, or there may be link errors
// when linkings against it statically.
+// GCC 9 gives a warning about missing attributes so it's excluded until
+// uClibc+GCC9 support is needed.
int __GI_vsnprintf(char *str, size_t size, const char *fmt, va_list ap) __attribute__((weak, alias ("vsnprintf")));
#endif
diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c
index e8a1983b0..c8e369e79 100755
--- a/lib/utils/pyexec.c
+++ b/lib/utils/pyexec.c
@@ -131,7 +131,9 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
// at the moment, the value of SystemExit is unused
ret = pyexec_system_exit;
} else {
- mp_obj_print_exception(&mp_plat_print, (mp_obj_t)nlr.ret_val);
+ if ((mp_obj_t) nlr.ret_val != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) {
+ mp_obj_print_exception(&mp_plat_print, (mp_obj_t)nlr.ret_val);
+ }
ret = PYEXEC_EXCEPTION;
}
}