dbfe3c7c28
check_type() fails to reject optional members with reserved names,
because it neglects to strip off the leading '*'. Fix that.
The stripping in check_name_str() is now useless. Drop.
Also drop the "no leading '*'" assertion, because valid_name.match()
ensures it can't fail.
Fixes: 9fb081e0b9
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-8-armbru@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
8 lines
440 B
JSON
8 lines
440 B
JSON
# Potential C member name collision
|
|
# We reject use of 'u' as a member name, to allow it for internal use in
|
|
# putting union branch members in a separate namespace from QMP members.
|
|
# This is true even for non-unions, because it is possible to convert a
|
|
# struct to flat union while remaining backwards compatible in QMP.
|
|
# TODO - we could munge the member name to 'q_u' to avoid the collision
|
|
{ 'struct': 'Oops', 'data': { '*u': 'str' } }
|