diff options
author | Damien George <damien.p.george@gmail.com> | 2016-10-11 13:11:32 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-10-11 13:11:32 +1100 |
commit | 8bb7d958f173eec58892bc00115516c160f93243 (patch) | |
tree | 6e17bda1e05c52ef8d627c3ca253055bce895a1f /py/objint.h | |
parent | df3e5d2b2f8610d246fea348bb96e70f636183ea (diff) | |
download | micropython-8bb7d958f173eec58892bc00115516c160f93243.tar.gz micropython-8bb7d958f173eec58892bc00115516c160f93243.zip |
py: Factor duplicated function to calculate size of formatted int.
Diffstat (limited to 'py/objint.h')
-rw-r--r-- | py/objint.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/objint.h b/py/objint.h index c79eb874a9..dc53e0708a 100644 --- a/py/objint.h +++ b/py/objint.h @@ -50,6 +50,8 @@ typedef enum { mp_fp_as_int_class_t mp_classify_fp_as_int(mp_float_t val); #endif // MICROPY_PY_BUILTINS_FLOAT +size_t mp_int_format_size(size_t num_bits, int base, const char *prefix, char comma); + void mp_obj_int_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind); char *mp_obj_int_formatted(char **buf, mp_uint_t *buf_size, mp_uint_t *fmt_size, mp_const_obj_t self_in, int base, const char *prefix, char base_char, char comma); |