mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
py/mpconfig: Introduce SIZE_FMT macro.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This commit is contained in:
committed by
Damien George
parent
bb205f0931
commit
ab00806025
@@ -37,6 +37,7 @@
|
|||||||
#define UINT_FMT "%llu"
|
#define UINT_FMT "%llu"
|
||||||
#define INT_FMT "%lld"
|
#define INT_FMT "%lld"
|
||||||
#define HEX_FMT "%llx"
|
#define HEX_FMT "%llx"
|
||||||
|
#define SIZE_FMT "%lu"
|
||||||
typedef int64_t mp_int_t;
|
typedef int64_t mp_int_t;
|
||||||
typedef uint64_t mp_uint_t;
|
typedef uint64_t mp_uint_t;
|
||||||
|
|
||||||
|
|||||||
@@ -49,3 +49,4 @@ typedef uint64_t mp_uint_t;
|
|||||||
#define UINT_FMT "%llu"
|
#define UINT_FMT "%llu"
|
||||||
#define INT_FMT "%lld"
|
#define INT_FMT "%lld"
|
||||||
#define HEX_FMT "%llx"
|
#define HEX_FMT "%llx"
|
||||||
|
#define SIZE_FMT "%lu"
|
||||||
|
|||||||
@@ -2244,15 +2244,18 @@ typedef time_t mp_timestamp_t;
|
|||||||
#define UINT_FMT "%lu"
|
#define UINT_FMT "%lu"
|
||||||
#define INT_FMT "%ld"
|
#define INT_FMT "%ld"
|
||||||
#define HEX_FMT "%lx"
|
#define HEX_FMT "%lx"
|
||||||
|
#define SIZE_FMT "%lu"
|
||||||
#elif defined(_WIN64)
|
#elif defined(_WIN64)
|
||||||
#define UINT_FMT "%llu"
|
#define UINT_FMT "%llu"
|
||||||
#define INT_FMT "%lld"
|
#define INT_FMT "%lld"
|
||||||
#define HEX_FMT "%llx"
|
#define HEX_FMT "%llx"
|
||||||
|
#define SIZE_FMT "%llu"
|
||||||
#else
|
#else
|
||||||
// Archs where mp_int_t == int
|
// Archs where mp_int_t == int
|
||||||
#define UINT_FMT "%u"
|
#define UINT_FMT "%u"
|
||||||
#define INT_FMT "%d"
|
#define INT_FMT "%d"
|
||||||
#define HEX_FMT "%x"
|
#define HEX_FMT "%x"
|
||||||
|
#define SIZE_FMT "%u"
|
||||||
#endif
|
#endif
|
||||||
#endif // INT_FMT
|
#endif // INT_FMT
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user