This website requires JavaScript.
Explore
Help
Sign In
OpenE2K
/
qemu-e2k
Watch
13
Star
4
Fork
0
You've already forked qemu-e2k
Code
Issues
4
Pull Requests
Projects
2
Releases
Activity
93262464d2
qemu-e2k
/
tests
/
qapi-schema
/
bad-if-empty-list.json
4 lines
102 B
JSON
Raw
Normal View
History
Unescape
Escape
qapi: add 'if' to top-level expressions Accept 'if' key in top-level elements, accepted as string or list of string type. The following patches will modify the test visitor to check the value is correctly saved, and generate #if/#endif code (as a single #if/endif line or a series for a list). Example of 'if' key: { 'struct': 'TestIfStruct', 'data': { 'foo': 'int' }, 'if': 'defined(TEST_IF_STRUCT)' } The generated code is for now *unconditional*. Later patches generate the conditionals. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180703155648.11933-2-marcandre.lureau@redhat.com> [Commit message and Documentation improved] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03 17:56:35 +02:00
#
c
h
e
c
k
e
m
p
t
y
'
i
f
'
l
i
s
t
{
'
s
t
r
u
c
t
'
:
'
T
e
s
t
I
f
S
t
r
u
c
t
'
,
'
d
a
t
a
'
:
{
'
f
o
o
'
:
'
i
n
t
'
}
,
qapi: replace if condition list with dict {'all': [...]} Replace the simple list sugar form with a recursive structure that will accept other operators in the following commits (all, any or not). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210804083105.97531-7-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Accidental code motion undone. Degenerate :forms: comment dropped. Helper _check_if() moved. Error messages tweaked. ui.json updated. Accidental changes to qapi-schema-test.json dropped.] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-08-04 10:31:01 +02:00
'
i
f
'
:
{
'
a
l
l
'
:
[
]
}
}
Reference in New Issue
Copy Permalink