mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
qapi/commands: add #if conditions to commands
Wrap generated code with #if/#endif using an 'ifcontext' on QAPIGenCSnippet objects. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180703155648.11933-10-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Line breaks tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
d626b6c1ae
commit
1f7b9f3181
2 changed files with 18 additions and 10 deletions
|
@ -12,12 +12,12 @@
|
|||
|
||||
static QmpCommandList qmp_commands;
|
||||
|
||||
/* #if defined(TEST_IF_STRUCT) && defined(TEST_IF_CMD) */
|
||||
#if defined(TEST_IF_STRUCT) && defined(TEST_IF_CMD)
|
||||
UserDefThree *qmp_TestIfCmd(TestIfStruct *foo, Error **errp)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
/* #endif */
|
||||
#endif
|
||||
|
||||
UserDefThree *qmp_TestCmdReturnDefThree(Error **errp)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue