From 03f50d39dad8624bc3cbf5c7c8b49e9ef9686464 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 15 Jan 2026 23:29:52 +1100 Subject: [PATCH] py/mpconfig: Enable MICROPY_PY_FUNCTION_ATTRS_CODE when marshal enabled. In case `MICROPY_PY_MARSHAL` is enabled manually. Otherwise the marshal module is not very usable. Signed-off-by: Damien George --- py/mpconfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/mpconfig.h b/py/mpconfig.h index 2a71c73162..9a2c753462 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1281,7 +1281,7 @@ typedef time_t mp_timestamp_t; // Whether to implement the __code__ attribute on functions, and function constructor #ifndef MICROPY_PY_FUNCTION_ATTRS_CODE -#define MICROPY_PY_FUNCTION_ATTRS_CODE (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_FULL_FEATURES) +#define MICROPY_PY_FUNCTION_ATTRS_CODE (MICROPY_PY_MARSHAL || MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_FULL_FEATURES) #endif // Whether bound_method can just use == (feature disabled), or requires a call to