From db0a836fc1c4cb20fc84edca19b57534d7365287 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 21 Jun 2025 09:35:39 +0200 Subject: py/profile: Fix printing lineno in frame objects. The argument corresponding to a `%q` specifier must be of type `qstr`, not a narrower type like `int16_t`. Not ensuring this caused an assertion error on one Windows x64 build. The argument corresponding to a `%d` specifier must be of type `int`, not a potentially-wider type like `mp_uint_t`. Not ensuring this prevented the function name from being printed on the unix nanbox build. Signed-off-by: Jeff Epler --- py/profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/profile.c') diff --git a/py/profile.c b/py/profile.c index 397d0291f..b5a0c5472 100644 --- a/py/profile.c +++ b/py/profile.c @@ -80,7 +80,7 @@ static void frame_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t "", frame, MP_CODE_QSTR_MAP(code->context, 0), - frame->lineno, + (int)frame->lineno, MP_CODE_QSTR_MAP(code->context, prelude->qstr_block_name_idx) ); } -- cgit v1.2.3