On Tue, Aug 09, 2016 at 06:18:51PM +0200, Paolo Bonzini wrote: > > > On 09/08/2016 17:31, Daniel P. Berrange wrote: > > Since there will shortly be multiple event groups allowed, > > we can no longer use the TraceEventID and TraceEventVCPUID > > enums in the trace control APIs. There will in fact be > > multiple distinct enums, and the enum values will only be > > required to be unique per group. > > > > Signed-off-by: Daniel P. Berrange <[email protected]> > > --- > > trace/control-internal.h | 14 +++++++------- > > trace/control-target.c | 6 +++--- > > trace/control.h | 25 ++++++------------------- > > trace/event-internal.h | 4 ++-- > > trace/simple.c | 6 +++--- > > trace/simple.h | 2 +- > > 6 files changed, 22 insertions(+), 35 deletions(-) > > > > diff --git a/trace/control-internal.h b/trace/control-internal.h > > index 634effe..b7048d4 100644 > > --- a/trace/control-internal.h > > +++ b/trace/control-internal.h > > @@ -24,13 +24,13 @@ static inline bool trace_event_is_pattern(const char > > *str) > > return strchr(str, '*') != NULL; > > } > > > > -static inline TraceEventID trace_event_get_id(TraceEvent *ev) > > +static inline size_t trace_event_get_id(TraceEvent *ev) > > { > > assert(ev != NULL); > > return ev->id; > > Perhaps "unsigned" is a better match than size_t?
I don't mind either way - I just happen to personally always use size_t for anything that ends up being used primarily as an array index. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
