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 <damien@micropython.org>
This commit is contained in:
Damien George
2026-01-15 23:29:52 +11:00
parent a5bda23aaa
commit 03f50d39da

View File

@@ -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