Re: [Qemu-devel] [PATCH v10 09/25] qapi: Prefer typesafe upcasts to qapi base classes

2015-10-26 Thread Eric Blake
On 10/26/2015 11:54 AM, Markus Armbruster wrote: >> It sounds like I have two options for v11: >> >> 1. Keep 9/25 introducing gen_upcast(), just for union types, and >> including testsuite coverage. In 10/25, make use of the upcast functions >> to struct as part of making structs sane. >> >> 2. Sw

Re: [Qemu-devel] [PATCH v10 09/25] qapi: Prefer typesafe upcasts to qapi base classes

2015-10-26 Thread Markus Armbruster
Eric Blake writes: > On 10/26/2015 01:33 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> On 10/23/2015 09:30 AM, Markus Armbruster wrote: Eric Blake writes: > A previous patch (commit 1e6c1616) made it possible to > directly cast from a qapi type to its base type. A

Re: [Qemu-devel] [PATCH v10 09/25] qapi: Prefer typesafe upcasts to qapi base classes

2015-10-26 Thread Eric Blake
On 10/26/2015 01:33 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 10/23/2015 09:30 AM, Markus Armbruster wrote: >>> Eric Blake writes: >>> A previous patch (commit 1e6c1616) made it possible to directly cast from a qapi type to its base type. A future patch will do lik

Re: [Qemu-devel] [PATCH v10 09/25] qapi: Prefer typesafe upcasts to qapi base classes

2015-10-26 Thread Markus Armbruster
Eric Blake writes: > On 10/23/2015 09:30 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> A previous patch (commit 1e6c1616) made it possible to >>> directly cast from a qapi type to its base type. A future >>> patch will do likewise for structs. However, it requires >>> the client co

Re: [Qemu-devel] [PATCH v10 09/25] qapi: Prefer typesafe upcasts to qapi base classes

2015-10-23 Thread Eric Blake
On 10/23/2015 09:30 AM, Markus Armbruster wrote: > Eric Blake writes: > >> A previous patch (commit 1e6c1616) made it possible to >> directly cast from a qapi type to its base type. A future >> patch will do likewise for structs. However, it requires >> the client code to use a C cast, which tur

Re: [Qemu-devel] [PATCH v10 09/25] qapi: Prefer typesafe upcasts to qapi base classes

2015-10-23 Thread Markus Armbruster
Eric Blake writes: > A previous patch (commit 1e6c1616) made it possible to > directly cast from a qapi type to its base type. A future > patch will do likewise for structs. However, it requires > the client code to use a C cast, which turns off compiler > type-safety checks if the client gets i

[Qemu-devel] [PATCH v10 09/25] qapi: Prefer typesafe upcasts to qapi base classes

2015-10-22 Thread Eric Blake
A previous patch (commit 1e6c1616) made it possible to directly cast from a qapi type to its base type. A future patch will do likewise for structs. However, it requires the client code to use a C cast, which turns off compiler type-safety checks if the client gets it wrong. So this patch adds in