Skip to content

Commit 978d2e5

Browse files
committed
py/runtime: Use appropriate printf fmt for malloc num_bytes.
1 parent c1c57ea commit 978d2e5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

py/runtime.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ mp_obj_t mp_parse_compile_execute(mp_lexer_t *lex, mp_parse_input_kind_t parse_i
13511351
#endif // MICROPY_ENABLE_COMPILER
13521352

13531353
void *m_malloc_fail(size_t num_bytes) {
1354-
DEBUG_printf("memory allocation failed, allocating " UINT_FMT " bytes\n", num_bytes);
1354+
DEBUG_printf("memory allocation failed, allocating %u bytes\n", (uint)num_bytes);
13551355
if (0) {
13561356
// dummy
13571357
#if MICROPY_ENABLE_GC
@@ -1361,7 +1361,7 @@ void *m_malloc_fail(size_t num_bytes) {
13611361
#endif
13621362
} else {
13631363
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_MemoryError,
1364-
"memory allocation failed, allocating " UINT_FMT " bytes", num_bytes));
1364+
"memory allocation failed, allocating %u bytes", (uint)num_bytes));
13651365
}
13661366
}
13671367

0 commit comments

Comments
 (0)