From 8b3439e26c293e374bf94c674d1e747d5a57034f Mon Sep 17 00:00:00 2001 From: Yoctopuce dev Date: Sun, 20 Jul 2025 16:38:33 +0200 Subject: [PATCH] unix/variants/longlong: Use REPR_C on this variant. There is currently no build using REPR_C in the unix CI tests. As discussed in PR #16953, this is something that combines well with the longlong build. Signed-off-by: Yoctopuce dev --- ports/unix/variants/longlong/mpconfigvariant.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ports/unix/variants/longlong/mpconfigvariant.h b/ports/unix/variants/longlong/mpconfigvariant.h index 20c52e98f..a04ff7a6d 100644 --- a/ports/unix/variants/longlong/mpconfigvariant.h +++ b/ports/unix/variants/longlong/mpconfigvariant.h @@ -30,6 +30,15 @@ #define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_LONGLONG) +// We build it on top of REPR C, which uses memory-efficient floating point +// objects encoded directly mp_obj_t (30 bits only). +// Therefore this variant should be built using MICROPY_FORCE_32BIT=1 + +#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C) +#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT) +typedef int mp_int_t; +typedef unsigned int mp_uint_t; + // Set base feature level. #define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_EXTRA_FEATURES)