summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2017-11-01 17:52:25 -0400
committerGitHub <noreply@github.com>2017-11-01 17:52:25 -0400
commitb6587b3b605fbfc8e92bc24c43c1fd5106f8c6aa (patch)
tree684e51e0bf651ec8e248c27a64367bad1d103b7d
parentdcede575fffb9c73d2340c64efc05bd898b86923 (diff)
parent6370b5225a9ad88aadd3fc3ac2ee63c17d79f642 (diff)
Merge pull request #396 from tannewt/gc_crash
py: Prevent crash with LTO.
-rw-r--r--py/runtime_utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/py/runtime_utils.c b/py/runtime_utils.c
index a5c5403ba..bcf3cbf7b 100644
--- a/py/runtime_utils.c
+++ b/py/runtime_utils.c
@@ -25,9 +25,10 @@
* THE SOFTWARE.
*/
+#include "py/mpconfig.h"
#include "py/runtime.h"
-void mp_call_function_1_protected(mp_obj_t fun, mp_obj_t arg) {
+MP_NOINLINE void mp_call_function_1_protected(mp_obj_t fun, mp_obj_t arg) {
nlr_buf_t nlr;
if (nlr_push(&nlr) == 0) {
mp_call_function_1(fun, arg);