On Tue, May 05, 2015 at 08:36:45AM -0600, Eric Blake wrote:
> On 05/05/2015 07:26 AM, Eduardo Habkost wrote:
> >> +{ 'enum': 'AccelId',
> >> +  'data': ['qtest', 'tcg', 'kvm', 'xen'] }
> >> +
> > 
> > Not sure if it is better to have an enum or simply a string here.
> 
> enum is almost always better when there is a finite set of possible
> strings - it's better documented, and when introspection is in place,
> will make it easier to determine when the set has grown.

True, and there are other cases where we could use an enum internally in
QEMU (e.g. arrays for accelerator-specific data inside CPU classes).

-- 
Eduardo

Reply via email to