all: Simplify mp_int_t/mp_uint_t definition.

Assuming proper C99 language support, we can select "the int type as big as
a pointer" (most of the time) or "the 64-bit int type" (nanboxing with
REPR_D), and then define everything else automatically.

This simplifies port configuration files.  And the types can still be
overridden if needed.

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This commit is contained in:
Jeff Epler
2025-10-11 19:12:55 -05:00
committed by Damien George
parent eac81de4e0
commit 007f127a61
40 changed files with 106 additions and 188 deletions

View File

@@ -41,12 +41,3 @@
#define MICROPY_EMIT_X64 (0)
#define MICROPY_EMIT_THUMB (0)
#define MICROPY_EMIT_ARM (0)
#include <stdint.h>
typedef int64_t mp_int_t;
typedef uint64_t mp_uint_t;
#define UINT_FMT "%llu"
#define INT_FMT "%lld"
#define HEX_FMT "%llx"
#define SIZE_FMT "%lu"