aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/reserved-member-u.json
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qapi-schema/reserved-member-u.json')
-rw-r--r--tests/qapi-schema/reserved-member-u.json7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/qapi-schema/reserved-member-u.json b/tests/qapi-schema/reserved-member-u.json
new file mode 100644
index 0000000000..1eaf0f301c
--- /dev/null
+++ b/tests/qapi-schema/reserved-member-u.json
@@ -0,0 +1,7 @@
+# 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' } }