qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 2/3] qapi: Add enum_table[] parameter to star


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH v2 2/3] qapi: Add enum_table[] parameter to start_alternate
Date: Wed, 10 May 2017 10:38:02 -0300
User-agent: Mutt/1.8.0 (2017-02-23)

On Wed, May 10, 2017 at 03:34:52PM +0200, Markus Armbruster wrote:
> Eduardo Habkost <address@hidden> writes:
> 
> > The new parameter will be used by the string input visitor to detect
> > alternate types that can't be parsed unambiguously.
> >
> > Signed-off-by: Eduardo Habkost <address@hidden>
[...]
> > diff --git a/qapi/trace-events b/qapi/trace-events
> > index b15a55b797..384c251814 100644
> > --- a/qapi/trace-events
> > +++ b/qapi/trace-events
> > @@ -11,7 +11,7 @@ visit_next_list(void *v, void *tail, size_t size) "v=%p 
> > tail=%p size=%zu"
> >  visit_check_list(void *v) "v=%p"
> >  visit_end_list(void *v, void *obj) "v=%p obj=%p"
> >  
> > -visit_start_alternate(void *v, const char *name, void *obj, size_t size, 
> > uint32_t supported_qtypes) "v=%p name=%s obj=%p size=%zu 
> > supported_qtypes=0x%x"
> > +visit_start_alternate(void *v, const char *name, void *obj, size_t size, 
> > uint32_t supported_qtypes, void *enum_table) "v=%p name=%s obj=%p size=%zu 
> > supported_qtypes=0x%x enum_table=%p"
> >  visit_end_alternate(void *v, void *obj) "v=%p obj=%p"
> >  
> >  visit_optional(void *v, const char *name, bool *present) "v=%p name=%s 
> > present=%p"
> 
> Not yet sure we need this, but if we do, clarify the function comment,
> and you may add
> 
> Reviewed-by: Markus Armbruster <address@hidden>

Thanks.

The only reason for this patch is to allow code in patch 3/3 to
detect ambiguous enums at runtime. I don't think the runtime
detection solution looked good, though, so I will probably drop
this patch.

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]