xdrgen: Document that aggregate members of a struct share an element type

check_aggregate_directives() rejects a second marked member whose
element type differs from the first, because one hook set serves
every marked member of a struct and its item hook takes a single
element type. The README says the members share a hook set but
never states the restriction that follows from it, so a spec
author learns of it only from the diagnostic.

State the restriction where the shared hook set is described.

Signed-off-by: Chuck Lever <cel@kernel.org>
This commit is contained in:
Chuck Lever 2026-09-08 11:16:13 -04:00
parent f10ffc2433
commit e44471d1d0

View File

@ -201,8 +201,10 @@ For example:
The hooks are supplied by hand. Their names derive from the pragma
header and the containing struct, so that two programs sharing a
type name resolve to distinct symbols. All marked members of one
struct share a hook set; the cursor's member_id field selects the
member:
struct share a hook set, so they share one element type as well;
xdrgen rejects a marked member whose element type differs from
that of a member already marked in the same struct. The cursor's
member_id field selects the member:
nfs_acl2_secattr_encode_begin()
nfs_acl2_secattr_encode()