| c2985e38 | 13-Feb-2023 |
Markus Armbruster <armbru@redhat.com> |
docs/devel/qapi-code-gen: Fix a missing 'may', clarify SchemaInfo
Documentation of enumeration value conditions lacks a 'may'. Fix that.
Clarify SchemaInfo documentation for struct and union types
docs/devel/qapi-code-gen: Fix a missing 'may', clarify SchemaInfo
Documentation of enumeration value conditions lacks a 'may'. Fix that.
Clarify SchemaInfo documentation for struct and union types.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230213132009.918801-3-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
show more ...
|
| ebf1b324 | 13-Feb-2023 |
Markus Armbruster <armbru@redhat.com> |
docs/devel/qapi-code-gen: Belatedly update features documentation
Commit 013b4efc9be "qapi: Add feature flags to remaining definitions" (v5.0.0), commit 84ab0086879 "qapi: Add feature flags to struc
docs/devel/qapi-code-gen: Belatedly update features documentation
Commit 013b4efc9be "qapi: Add feature flags to remaining definitions" (v5.0.0), commit 84ab0086879 "qapi: Add feature flags to struct members" (v5.0.0), and commit b6c18755e41 "qapi: Add feature flags to enum members" (v6.2.0) neglected to update section "Features". Make up for that.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230213132009.918801-2-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
show more ...
|
| 76a2f554 | 28-Nov-2022 |
Emanuele Giuseppe Esposito <eesposit@redhat.com> |
block-coroutine-wrapper.py: introduce co_wrapper
This new annotation starts just a function wrapper that creates a new coroutine. It assumes the caller is not a coroutine. It will be the default ann
block-coroutine-wrapper.py: introduce co_wrapper
This new annotation starts just a function wrapper that creates a new coroutine. It assumes the caller is not a coroutine. It will be the default annotation to be used in the future.
This is much better as c_w_mixed, because it is clear if the caller is a coroutine or not, and provides the advantage of automating the code creation. In the future all c_w_mixed functions will be substituted by co_wrapper.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Message-Id: <20221128142337.657646-11-eesposit@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
| 44ea9d9b | 04-Nov-2022 |
Markus Armbruster <armbru@redhat.com> |
qapi: Start to elide redundant has_FOO in generated C
In QAPI, absent optional members are distinct from any present value. We thus represent an optional schema member FOO as two C members: a FOO wi
qapi: Start to elide redundant has_FOO in generated C
In QAPI, absent optional members are distinct from any present value. We thus represent an optional schema member FOO as two C members: a FOO with the member's type, and a bool has_FOO. Likewise for function arguments.
However, has_FOO is actually redundant for a pointer-valued FOO, which can be null only when has_FOO is false, i.e. has_FOO == !!FOO. Except for arrays, where we a null FOO can also be a present empty array.
The redundant has_FOO are a nuisance to work with. Improve the generator to elide them. Uses of has_FOO need to be replaced as follows.
Tests of has_FOO become the equivalent comparison of FOO with null. For brevity, this is commonly done by implicit conversion to bool.
Assignments to has_FOO get dropped.
Likewise for arguments to has_FOO parameters.
Beware: code may violate the invariant has_FOO == !!FOO before the transformation, and get away with it. The above transformation can then break things. Two cases:
* Absent: if code ignores FOO entirely when !has_FOO (except for freeing it if necessary), even non-null / uninitialized FOO works. Such code is known to exist.
* Present: if code ignores FOO entirely when has_FOO, even null FOO works. Such code should not exist.
In both cases, replacing tests of has_FOO by FOO reverts their sense. We have to fix the value of FOO then.
To facilitate review of the necessary updates to handwritten code, add means to opt out of this change, and opt out for all QAPI schema modules where the change requires updates to handwritten code. The next few commits will remove these opt-outs in reviewable chunks, then drop the means to opt out.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20221104160712.3005652-5-armbru@redhat.com>
show more ...
|
| 94f9bd33 | 04-Nov-2022 |
Markus Armbruster <armbru@redhat.com> |
docs/devel/qapi-code-gen: Extend example for next commit's change
The next commit will change the code generated for some optional members. The example schema contains an optional member affected b
docs/devel/qapi-code-gen: Extend example for next commit's change
The next commit will change the code generated for some optional members. The example schema contains an optional member affected by the change. Add one that is not affected.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20221104160712.3005652-4-armbru@redhat.com>
show more ...
|
| 73ee4c55 | 17-Nov-2022 |
Alex Bennée <alex.bennee@linaro.org> |
docs/devel: try and improve the language around patch review
It is important that contributors take the review process seriously and we collaborate in a respectful way while avoiding personal attack
docs/devel: try and improve the language around patch review
It is important that contributors take the review process seriously and we collaborate in a respectful way while avoiding personal attacks. Try and make this clear in the language.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20221117172532.538149-8-alex.bennee@linaro.org>
show more ...
|
| ca127fe9 | 17-Nov-2022 |
Alex Bennée <alex.bennee@linaro.org> |
docs/devel: simplify the minimal checklist
The bullet points are quite long and contain process tips. Move those bits of the bullet to the relevant sections and link to them. Use a table for nicer f
docs/devel: simplify the minimal checklist
The bullet points are quite long and contain process tips. Move those bits of the bullet to the relevant sections and link to them. Use a table for nicer formatting of the checklist.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20221117172532.538149-7-alex.bennee@linaro.org>
show more ...
|
| 115847f6 | 17-Nov-2022 |
Alex Bennée <alex.bennee@linaro.org> |
docs/devel: make language a little less code centric
We welcome all sorts of patches.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed
docs/devel: make language a little less code centric
We welcome all sorts of patches.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20221117172532.538149-6-alex.bennee@linaro.org>
show more ...
|