summaryrefslogtreecommitdiff
path: root/py/runtime.h
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2024-01-25 09:09:06 -0600
committerDamien George <damien@micropython.org>2025-05-13 12:16:35 +1000
commit9032491efd8a63e0b13dbcfb8579cde4791c03af (patch)
tree50245b32d8cba4f36c049a7c68cf11ff6606b5aa /py/runtime.h
parentf47e214cdcf11c2067936cb4b4e4f9deab73f6fc (diff)
py/objstr: Add support for the :_b/o/x specifier in str.format.
This groups non-decimal values by fours, such as bbb_bbbb_bbbb. It also supports `{:_d}` to use underscore for decimal numbers (grouped in threes). Use of incorrect ":,b" is not diagnosed. Thanks to @dpgeorge for the suggestion to reduce code size. Signed-off-by: Jeff Epler <jepler@gmail.com>
Diffstat (limited to 'py/runtime.h')
-rw-r--r--py/runtime.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/runtime.h b/py/runtime.h
index 064bd021d..a93488e2c 100644
--- a/py/runtime.h
+++ b/py/runtime.h
@@ -128,7 +128,7 @@ void mp_event_wait_indefinite(void);
void mp_event_wait_ms(mp_uint_t timeout_ms);
// extra printing method specifically for mp_obj_t's which are integral type
-int mp_print_mp_int(const mp_print_t *print, mp_obj_t x, int base, int base_char, int flags, char fill, int width, int prec);
+int mp_print_mp_int(const mp_print_t *print, mp_obj_t x, unsigned base, int base_char, int flags, char fill, int width, int prec);
void mp_arg_check_num_sig(size_t n_args, size_t n_kw, uint32_t sig);
static inline void mp_arg_check_num(size_t n_args, size_t n_kw, size_t n_args_min, size_t n_args_max, bool takes_kw) {