summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2025-07-18 06:37:26 -0500
committerDamien George <damien@micropython.org>2025-07-25 10:55:28 +1000
commit7493275918dbe7d787044e648bc8036062cf7b0d (patch)
treeadc3c7dfc6d21c5bfb1937b6aaacd275a2845b1d /py
parent0c8d35b322554293c0847a618fa90760cefa1b60 (diff)
py/mpconfig,ports: Define new HEX_FMT formatting macro.
Signed-off-by: Jeff Epler <jepler@gmail.com>
Diffstat (limited to 'py')
-rw-r--r--py/mpconfig.h3
1 files changed, 3 insertions, 0 deletions
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