summaryrefslogtreecommitdiffstatshomepage
path: root/py/mpprint.c
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2025-06-13 17:52:29 +0200
committerDamien George <damien@micropython.org>2025-06-16 13:58:13 +1000
commit1a8f4b290bc19cc3981f6deb2cb10a40a7b3bbea (patch)
tree6351c2d3ddb6ecbbb2a91bc20f135dd26bf9b488 /py/mpprint.c
parent73b1cbc17abe6da6f913d30dad960e5401577c0f (diff)
downloadmicropython-1a8f4b290bc19cc3981f6deb2cb10a40a7b3bbea.tar.gz
micropython-1a8f4b290bc19cc3981f6deb2cb10a40a7b3bbea.zip
py/mpprint: Remove unused "PF_FLAG_NO_TRAILZ" flag.
Looking at the git history, there's no indication that the `PF_FLAG_NO_TRAILZ` flag was ever implemented or that "%!" was used as an `mp_printf` format string in practice. So remove the flag and re-number the other flags. Leave `PF_FLAG_SEP_POS` at 9 (the highest position that probably works with 16-bit integers like the pic16bit port). Signed-off-by: Jeff Epler <jepler@gmail.com>
Diffstat (limited to 'py/mpprint.c')
-rw-r--r--py/mpprint.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/py/mpprint.c b/py/mpprint.c
index 00a5f944c6..86dbfad05e 100644
--- a/py/mpprint.c
+++ b/py/mpprint.c
@@ -413,8 +413,6 @@ int mp_vprintf(const mp_print_t *print, const char *fmt, va_list args) {
flags |= PF_FLAG_SHOW_SIGN;
} else if (*fmt == ' ') {
flags |= PF_FLAG_SPACE_SIGN;
- } else if (*fmt == '!') {
- flags |= PF_FLAG_NO_TRAILZ;
} else if (*fmt == '0') {
flags |= PF_FLAG_PAD_AFTER_SIGN;
fill = '0';