On 05/30/2017 02:32 AM, Marc-André Lureau wrote: > Hi > > On Thu, May 11, 2017 at 6:30 PM Markus Armbruster wrote: > >> Marc-André Lureau writes: >> >> >>> + * >>> + * This work is licensed under the terms of the GNU LGPL, version 2.1 >> or later. >>> + * See the COPYING.LIB file in the top-level directory. >>> + */ >>> + >>> +#ifndef QNUM_H >>> +#define QNUM_H >>> + >>> +#include "qapi/qmp/qobject.h" >>> + >>> +typedef enum { >>> + QNUM_I64, >>> + QNUM_DOUBLE >>> +} QNumType; >> >> Not bool because you're going to add to it. Good. >> >> > Hmm? There is no plan to add bool there so far, I am not sure that makes > sense. I think the intent was more along these lines: "Using a two-element enum instead of a bool because a later patch will add to the enum" (with the implication that an enum is better for representing tri-state than a pair of bools). At any rate, the only change I'd make is to add the trailing comma to QNUM_DOUBLE (C99 permits trailing commas, and consistently using them makes for less churn down the road when extending an enum). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org