于 2013/12/14 7:50, Eric Blake 写道:
On 12/10/2013 10:48 PM, Wenchao Xia wrote:
After this patch, hidden enum type BlockdevOptionsKind will not
be generated, and other API can use enum BlockdevDriver.

Signed-off-by: Wenchao Xia <xiaw...@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <ebl...@redhat.com>
---
  qapi-schema.json |   14 +++++++++++++-
  1 files changed, 13 insertions(+), 1 deletions(-)

You know, it might even be better if we just flat out require that ALL
discriminated unions use an enum type, and discontinue support for
open-coded string (with hidden enum generation).  The extra type safety
and potential for introspection that it buys us is worth the change.  I
don't know how much of your series that would affect, but it's food for
thought.


  I thought that before, and it is not hard to do, just need
people's confirm that, string discriminator is not needed any more.


Reply via email to