From bceae7697ff1711675c26f715b945737bc6849ae Mon Sep 17 00:00:00 2001 From: Wenchao Xia Date: Thu, 6 Mar 2014 17:08:56 -0800 Subject: qapi script: support enum type as discriminator in union By default, any union will automatically generate a enum type as "[UnionName]Kind" in C code, and it is duplicated when the discriminator is specified as a pre-defined enum type in schema. After this patch, the pre-defined enum type will be really used as the switch case condition in generated C code, if discriminator is an enum field. Signed-off-by: Wenchao Xia Reviewed-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- tests/qapi-schema/flat-union-reverse-define.exit | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/qapi-schema/flat-union-reverse-define.exit (limited to 'tests/qapi-schema/flat-union-reverse-define.exit') diff --git a/tests/qapi-schema/flat-union-reverse-define.exit b/tests/qapi-schema/flat-union-reverse-define.exit new file mode 100644 index 0000000000..573541ac97 --- /dev/null +++ b/tests/qapi-schema/flat-union-reverse-define.exit @@ -0,0 +1 @@ +0 -- cgit 1.4.1