From 4db2cf09e0006cc7cb91654f4699538d7d7f7732 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 1 Sep 2025 21:28:02 -0500 Subject: [PATCH] shared/runtime/pyexec: Unconditionally reset lock depth. Saves code size for the same functionality. Signed-off-by: Jeff Epler --- shared/runtime/pyexec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/shared/runtime/pyexec.c b/shared/runtime/pyexec.c index c828c75817..0b253b4cea 100644 --- a/shared/runtime/pyexec.c +++ b/shared/runtime/pyexec.c @@ -598,9 +598,7 @@ friendly_repl_reset: // If the GC is locked at this point there is no way out except a reset, // so force the GC to be unlocked to help the user debug what went wrong. - if (MP_STATE_THREAD(gc_lock_depth) != 0) { - MP_STATE_THREAD(gc_lock_depth) = 0; - } + MP_STATE_THREAD(gc_lock_depth) = 0; vstr_reset(&line); int ret = readline(&line, mp_repl_get_ps1());