From 9096e2d9cb6f438e49aa29aa2cfaef1717466a05 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Fri, 28 Mar 2025 11:31:26 -0600 Subject: lib9p: idl: Rework bitfields, allow full exprs more places --- lib9p/protogen/c_validate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib9p/protogen/c_validate.py') diff --git a/lib9p/protogen/c_validate.py b/lib9p/protogen/c_validate.py index 7d0c69e..535a750 100644 --- a/lib9p/protogen/c_validate.py +++ b/lib9p/protogen/c_validate.py @@ -24,11 +24,11 @@ def should_save_offset(parent: idl.Struct, child: idl.StructMember) -> bool: for sibling in parent.members: if sibling.val: for tok in sibling.val.tokens: - if isinstance(tok, idl.ExprSym) and tok.symname == f"&{child.membname}": + if isinstance(tok, idl.ExprOff) and tok.membname == child.membname: return True if sibling.max: for tok in sibling.max.tokens: - if isinstance(tok, idl.ExprSym) and tok.symname == f"&{child.membname}": + if isinstance(tok, idl.ExprOff) and tok.membname == child.membname: return True return False -- cgit v1.2.3-2-g168b