scripts: logging: dictionary: Add support for size_t %z format specifier

This patch adds support for the size_t %z format specifier to the
dictionary parser.
It's the correct format to use for size_t types in modern C,
but it's not supported in python directly.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
This commit is contained in:
Maximilian Deubel 2024-11-12 17:13:07 +01:00 committed by Anas Nashif
parent 92a7ddfb56
commit 9bed2b7a98
1 changed files with 3 additions and 0 deletions

View File

@ -46,6 +46,9 @@ def formalize_fmt_string(fmt_str):
# No %p for pointer either, so use %x
new_str = new_str.replace("%p", "0x%x")
# No %z support, use %d instead
new_str = new_str.replace("%z", "%d")
return new_str