mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
py/modsys: Add optional sys.tracebacklimit attribute.
With behaviour as per CPython. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -141,6 +141,10 @@ void mp_init(void) {
|
||||
MP_STATE_THREAD(current_code_state) = NULL;
|
||||
#endif
|
||||
|
||||
#if MICROPY_PY_SYS_TRACEBACKLIMIT
|
||||
MP_STATE_VM(sys_mutable[MP_SYS_MUTABLE_TRACEBACKLIMIT]) = MP_OBJ_NEW_SMALL_INT(1000);
|
||||
#endif
|
||||
|
||||
#if MICROPY_PY_BLUETOOTH
|
||||
MP_STATE_VM(bluetooth) = MP_OBJ_NULL;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user