From a285a33076f35e9bc24015cf23ae484aa47ee95a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 22 Sep 2023 10:39:12 -0500 Subject: [PATCH] Restore our defines for exception chaining --- py/mpconfig.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/py/mpconfig.h b/py/mpconfig.h index 536bb24698..8398562cf2 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -809,6 +809,19 @@ typedef long long mp_longint_impl_t; #define MICROPY_ERROR_PRINTER (&mp_plat_print) #endif +// CIRCUITPY +// Whether to support chained exceptions +#ifndef MICROPY_CPYTHON_EXCEPTION_CHAIN +#define MICROPY_CPYTHON_EXCEPTION_CHAIN (0) +#endif + +// CIRCUITPY +// Whether the statically allocated GeneratorExit exception may be const +#ifndef MICROPY_CONST_GENERATOREXIT_OBJ +#define MICROPY_CONST_GENERATOREXIT_OBJ (!MICROPY_CPYTHON_EXCEPTION_CHAIN) +#endif + + // Float and complex implementation #define MICROPY_FLOAT_IMPL_NONE (0) #define MICROPY_FLOAT_IMPL_FLOAT (1)