Skip to contentSkip to conversation

docs/devel/qapi-code-gen: Don't reserve types ending with 'Kind'

PATCH In review Markus Armbruster 1 participant 2 messages Dec 21, 2023 – Jan 26, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs/devel/qapi-code-gen: Don't reserve types ending with 'Kind'

We reserved type names ending with 'Kind' because a simple union 'SomeSimpleUnion' generated both a struct type SomeSimpleUnion and an enum type SomeSimpleUnionKind. Gone since commit 4e99f4b12c0 (qapi:
Drop simple unions). The commit neglected to update the documentation not to reserve type names ending with 'Kind'. Do that now.

---
 docs/devel/qapi-code-gen.rst | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
docs/devel/qapi-code-gen.rst +2 -3
index 7f78183cd4..972b21a5aa 100644
@@ -737,9 +737,8 @@ Types, commands, and events share a common namespace.  Therefore,
 generally speaking, type definitions should always use CamelCase for
 user-defined type names, while built-in types are lowercase.
 
-Type names ending with ``Kind`` or ``List`` are reserved for the
-generator, which uses them for implicit union enums and array types,
-respectively.
+Type names ending with ``List`` are reserved for the generator, which
+uses them for array types.
 
 Command names, member names within a type, and feature names should be
 all lower case with words separated by a hyphen.  However, some
Signature · 1 line
2.43.0
#1 lore raw
Quoted 7 lines · Markus Armbruster

We reserved type names ending with 'Kind' because a simple union 'SomeSimpleUnion' generated both a struct type SomeSimpleUnion and an enum type SomeSimpleUnionKind. Gone since commit 4e99f4b12c0 (qapi:
Drop simple unions). The commit neglected to update the documentation not to reserve type names ending with 'Kind'. Do that now.

Queued.