summaryrefslogtreecommitdiff
path: root/lib9p/core_gen/c_fmt_print.py
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-17 03:20:11 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-17 12:57:08 -0600
commitab9103440ade87509a1a3bd1eaad0b5396a89d1e (patch)
tree423673909d0af66d4ef5e260ce58b4b554bf2024 /lib9p/core_gen/c_fmt_print.py
parentd505a998aafe5af8b02a2b2c2acf7e708812c3fc (diff)
Pull UTF-8 decoding into libmisc/utf8.c
Diffstat (limited to 'lib9p/core_gen/c_fmt_print.py')
-rw-r--r--lib9p/core_gen/c_fmt_print.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib9p/core_gen/c_fmt_print.py b/lib9p/core_gen/c_fmt_print.py
index eaacddb..7a0a9d3 100644
--- a/lib9p/core_gen/c_fmt_print.py
+++ b/lib9p/core_gen/c_fmt_print.py
@@ -112,7 +112,7 @@ def gen_c_fmt_print(versions: set[str], typs: list[idl.UserType]) -> str:
cnt_str = f"self->{member.cnt.membname}"
cnt_typ = c9util.typename(member.cnt.typ)
if member.typ.static_size == 1: # SPECIAL (data)
- ret += f"\tif (is_valid_utf8_without_nul((uint8_t *)self->{member.membname}, (size_t){cnt_str})) {{\n"
+ ret += f"\tif (utf8_is_valid_without_nul((uint8_t *)self->{member.membname}, (size_t){cnt_str})) {{\n"
ret += f'\t\tfmt_print_str(w, " {member.membname}=");\n'
ret += f"\t\tfmt_print_qmem(w, self->{member.membname}, {cnt_str} < 50 ? {cnt_str} : 50);\n"
ret += f"\t\tif ({cnt_str} > 50)\n"