Re: [PATCH 04/27] qapi: Start to elide redundant has_FOO in generated C

2022-09-16 Thread Daniel P . Berrangé
On Thu, Sep 15, 2022 at 10:42:54PM +0200, Markus Armbruster wrote: > 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. >

[PATCH 04/27] qapi: Start to elide redundant has_FOO in generated C

2022-09-15 Thread Markus Armbruster
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