mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 19:50:30 +01:00
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:
committed by
Damien George
parent
eac81de4e0
commit
007f127a61
@@ -2,9 +2,6 @@
|
||||
#define MICROPY_HW_MCU_NAME "AE302F80F55D5AE"
|
||||
|
||||
#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
|
||||
typedef intptr_t mp_int_t; // must be pointer size
|
||||
typedef uintptr_t mp_uint_t; // must be pointer size
|
||||
typedef intptr_t mp_off_t;
|
||||
|
||||
#define MICROPY_HW_USB_MSC (CORE_M55_HP)
|
||||
#define MICROPY_HW_ENABLE_HW_I2C (1)
|
||||
|
||||
@@ -191,12 +191,7 @@
|
||||
|
||||
#define MP_SSIZE_MAX (0x7fffffff)
|
||||
|
||||
// Assume that if we already defined the obj repr then we also defined these items
|
||||
#ifndef MICROPY_OBJ_REPR
|
||||
typedef intptr_t mp_int_t; // must be pointer size
|
||||
typedef uintptr_t mp_uint_t; // must be pointer size
|
||||
typedef intptr_t mp_off_t;
|
||||
#endif
|
||||
|
||||
// Board configuration settings.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user