summaryrefslogtreecommitdiff
path: root/lib9p/core_gen/c_format.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/core_gen/c_format.py')
-rw-r--r--lib9p/core_gen/c_format.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib9p/core_gen/c_format.py b/lib9p/core_gen/c_format.py
index 8c0cded..f9eee90 100644
--- a/lib9p/core_gen/c_format.py
+++ b/lib9p/core_gen/c_format.py
@@ -140,7 +140,8 @@ def gen_c_format(versions: set[str], typs: list[idl.UserType]) -> str:
ret += f'\tfmt_state_puts(state, " {member.membname}=[");\n'
ret += f"\tfor ({cnt_typ} i = 0; i < {cnt_str}; i++) {{\n"
ret += "\t\tif (i)\n"
- ret += '\t\t\tfmt_state_puts(state, ", ");\n'
+ ret += "\t\t\tfmt_state_putchar(state, ',');\n"
+ ret += "\t\tfmt_state_putchar(state, ' ');\n"
if isinstance(member.typ, idl.Primitive):
ret += f'\t\tfmt_state_printf(state, "%"PRIu{member.typ.static_size*8}, self->{member.membname}[i]);\n'
else: