diff options
| -rw-r--r-- | ports/powerpc/mpconfigport.h | 1 | ||||
| -rw-r--r-- | ports/qemu/mpconfigport.h | 1 | ||||
| -rw-r--r-- | ports/stm32/mpconfigport_nanbox.h | 1 | ||||
| -rw-r--r-- | ports/unix/variants/nanbox/mpconfigvariant.h | 1 | ||||
| -rw-r--r-- | py/mpconfig.h | 3 |
5 files changed, 7 insertions, 0 deletions
diff --git a/ports/powerpc/mpconfigport.h b/ports/powerpc/mpconfigport.h index b74f374e7..25d85c9e6 100644 --- a/ports/powerpc/mpconfigport.h +++ b/ports/powerpc/mpconfigport.h @@ -96,6 +96,7 @@ // This port is 64-bit #define UINT_FMT "%lu" #define INT_FMT "%ld" +#define HEX_FMT "%lx" typedef signed long mp_int_t; // must be pointer size typedef unsigned long mp_uint_t; // must be pointer size diff --git a/ports/qemu/mpconfigport.h b/ports/qemu/mpconfigport.h index b02507277..9c879f55d 100644 --- a/ports/qemu/mpconfigport.h +++ b/ports/qemu/mpconfigport.h @@ -72,6 +72,7 @@ #define UINT_FMT "%lu" #define INT_FMT "%ld" +#define HEX_FMT "%lx" typedef int32_t mp_int_t; // must be pointer size typedef uint32_t mp_uint_t; // must be pointer size diff --git a/ports/stm32/mpconfigport_nanbox.h b/ports/stm32/mpconfigport_nanbox.h index f36d55aca..ffd87ba2f 100644 --- a/ports/stm32/mpconfigport_nanbox.h +++ b/ports/stm32/mpconfigport_nanbox.h @@ -36,6 +36,7 @@ // Types needed for nan-boxing #define UINT_FMT "%llu" #define INT_FMT "%lld" +#define HEX_FMT "%llx" typedef int64_t mp_int_t; typedef uint64_t mp_uint_t; diff --git a/ports/unix/variants/nanbox/mpconfigvariant.h b/ports/unix/variants/nanbox/mpconfigvariant.h index 7b13b7dc6..8b23b93a8 100644 --- a/ports/unix/variants/nanbox/mpconfigvariant.h +++ b/ports/unix/variants/nanbox/mpconfigvariant.h @@ -48,3 +48,4 @@ typedef int64_t mp_int_t; typedef uint64_t mp_uint_t; #define UINT_FMT "%llu" #define INT_FMT "%lld" +#define HEX_FMT "%llx" diff --git a/py/mpconfig.h b/py/mpconfig.h index b812cf032..619bce2ab 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -2187,13 +2187,16 @@ typedef time_t mp_timestamp_t; // Archs where mp_int_t == long, long != int #define UINT_FMT "%lu" #define INT_FMT "%ld" +#define HEX_FMT "%lx" #elif defined(_WIN64) #define UINT_FMT "%llu" #define INT_FMT "%lld" +#define HEX_FMT "%llx" #else // Archs where mp_int_t == int #define UINT_FMT "%u" #define INT_FMT "%d" +#define HEX_FMT "%x" #endif #endif // INT_FMT |
