summaryrefslogtreecommitdiff
path: root/lib9p/protogen/c9util.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/protogen/c9util.py')
-rw-r--r--lib9p/protogen/c9util.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib9p/protogen/c9util.py b/lib9p/protogen/c9util.py
index e7ad999..10d1c8c 100644
--- a/lib9p/protogen/c9util.py
+++ b/lib9p/protogen/c9util.py
@@ -76,6 +76,8 @@ def typename(typ: idl.Type, parent: idl.StructMember | None = None) -> str:
match typ:
case idl.Primitive():
if typ.value == 1 and parent and parent.cnt: # SPECIAL (string)
+ if parent.membname == "data": # SPECIAL (zerocopy)
+ return f"struct {ident('_iovec')}"
return "[[gnu::nonstring]] char"
return f"uint{typ.value*8}_t"
case idl.Number():