Skip to content

Commit 4db2cf0

Browse files
jeplerdpgeorge
authored andcommitted
shared/runtime/pyexec: Unconditionally reset lock depth.
Saves code size for the same functionality. Signed-off-by: Jeff Epler <[email protected]>
1 parent a791f7f commit 4db2cf0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

shared/runtime/pyexec.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,7 @@ int pyexec_friendly_repl(void) {
598598

599599
// If the GC is locked at this point there is no way out except a reset,
600600
// so force the GC to be unlocked to help the user debug what went wrong.
601-
if (MP_STATE_THREAD(gc_lock_depth) != 0) {
602-
MP_STATE_THREAD(gc_lock_depth) = 0;
603-
}
601+
MP_STATE_THREAD(gc_lock_depth) = 0;
604602

605603
vstr_reset(&line);
606604
int ret = readline(&line, mp_repl_get_ps1());

0 commit comments

Comments
 (0)