diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-28 11:31:26 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-29 18:25:49 -0600 |
commit | 9096e2d9cb6f438e49aa29aa2cfaef1717466a05 (patch) | |
tree | 3ecce9bac17d3a4b89b11f1df281c0587d4443d4 /lib9p/protogen/c_validate.py | |
parent | fc462d13cb2f49b4c4745742dfaed994596a54b8 (diff) |
lib9p: idl: Rework bitfields, allow full exprs more places
Diffstat (limited to 'lib9p/protogen/c_validate.py')
-rw-r--r-- | lib9p/protogen/c_validate.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |