On 10/22/2015 06:10 AM, Markus Armbruster wrote: > > I believe we have these has_FOOs not because someone tried to minimize > confusion, but due to laziness: it was simpler to blindly generate the > has_FOO for every FOO. > > Since I don't think distinguishing "pointer argument omitted" from > "pointer argument is null" makes sense, I want the has_FOO killed for > pointer FOOs. Perhaps it's even in the QAPI review queue already, which > Eric keeps filling faster than I can drain it :)
It's not there yet (so it's missed 2.5), but it IS on my plate for 2.6, to add a per-struct attribute on whether the struct prefers has_FOO vs FOO==NULL for marking optional strings/objects (has_FOO will remain mandatory for optional numbers). Per-struct attribute, because there are too many structs to change in one patch, although if I scrub the entire tree, we may remove the attribute at the end of the conversion. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature