Merge pull request #396 from tannewt/gc_crash

py: Prevent crash with LTO.
This commit is contained in:
Dan Halbert 2017-11-01 17:52:25 -04:00 committed by GitHub
commit b6587b3b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);