summaryrefslogtreecommitdiff
path: root/lib9p/protogen/c.py
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-13 12:55:26 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-13 12:55:26 -0600
commit2a9d1f54758988ce23fbd1e9da4f0ad28c0edcbf (patch)
tree08b47b0e0772f590aa3ae48254590088a4b4402c /lib9p/protogen/c.py
parent52674d0483e3754b039857be1d11798859c5bcef (diff)
parentbf32c2cd495099c93195b202158f46870ceed0ef (diff)
Merge branch 'lukeshu/9p-malloc'
Diffstat (limited to 'lib9p/protogen/c.py')
-rw-r--r--lib9p/protogen/c.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib9p/protogen/c.py b/lib9p/protogen/c.py
index a6824ce..363f0df 100644
--- a/lib9p/protogen/c.py
+++ b/lib9p/protogen/c.py
@@ -122,6 +122,11 @@ def gen_c(versions: set[str], typs: list[idl.UserType]) -> str:
ret += f"const struct {c9util.ident('_ver_tentry')} {c9util.ident('_table_ver')}[{c9util.ver_enum('NUM')}] = {{\n"
rerror = next(typ for typ in typs if typ.typname == "Rerror")
for ver in ["unknown", *sorted(versions)]:
+ # XXX: There are good arguments that min_msg_size should be
+ # something larger than rerror.min_size().
+ # srv.c:respond_error() assumes that min_msg_size is
+ # rerror.min_size(); if you do change min_msg_size to
+ # something larger, then be sure to update respond_error().
if ver == "unknown":
min_msg_size = rerror.min_size("9P2000") # SPECIAL (initialization)
else: