diff options
| author | Jeff Epler <jepler@gmail.com> | 2025-09-01 21:28:02 -0500 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-09-02 13:41:20 +1000 |
| commit | 4db2cf09e0006cc7cb91654f4699538d7d7f7732 (patch) | |
| tree | 79f65bc3c352f4ceeb786a696abb39b0931fe364 /shared/runtime | |
| parent | a791f7f43ccc21f4275e3905240e61cf5bfa1c0c (diff) | |
shared/runtime/pyexec: Unconditionally reset lock depth.
Saves code size for the same functionality.
Signed-off-by: Jeff Epler <jepler@gmail.com>
Diffstat (limited to 'shared/runtime')
| -rw-r--r-- | shared/runtime/pyexec.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/shared/runtime/pyexec.c b/shared/runtime/pyexec.c index c828c7581..0b253b4ce 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()); |
