Skip to content

Commit 70daf00

Browse files
committed
In py/, must guard uses of RUN_BACKGROUND_TASKS
1 parent 932ac09 commit 70daf00

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

py/obj.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ const char *mp_obj_get_type_str(mp_const_obj_t o_in) {
6363
void mp_obj_print_helper(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind) {
6464
// There can be data structures nested too deep, or just recursive
6565
MP_STACK_CHECK();
66+
#ifdef RUN_BACKGROUND_TASKS
6667
RUN_BACKGROUND_TASKS;
68+
#endif
6769
#ifndef NDEBUG
6870
if (o_in == MP_OBJ_NULL) {
6971
mp_print_str(print, "(nil)");

py/stream.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,9 @@ STATIC mp_obj_t stream_readall(mp_obj_t self_in) {
341341
p = vstr_extend(&vstr, DEFAULT_BUFFER_SIZE);
342342
current_read = DEFAULT_BUFFER_SIZE;
343343
}
344+
#ifdef RUN_BACKGROUND_TASKS
344345
RUN_BACKGROUND_TASKS;
346+
#endif
345347
}
346348

347349
vstr.len = total_size;

0 commit comments

Comments
 (0)