[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v11 19/28] qapi: Change munging of
Re: [Qemu-block] [Qemu-devel] [PATCH v11 19/28] qapi: Change munging of CamelCase enum values
Thu, 12 Nov 2015 12:16:12 +0100
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
Gerd Hoffmann <address@hidden> writes:
>> > If desired, I can prepare an alternate patch that adds the dash to the
>> > qapi enum definition, to see what we think.
>> If Gerd is fine with the rename, let's do it.
> No need to do so I think ...
>> >> - [INPUT_BUTTON_WHEEL_UP] = SDL_BUTTON(SDL_BUTTON_WHEELUP),
>> >> - [INPUT_BUTTON_WHEEL_DOWN] = SDL_BUTTON(SDL_BUTTON_WHEELDOWN),
>> >> + [INPUT_BUTTON_WHEELUP] = SDL_BUTTON(SDL_BUTTON_WHEELUP),
>> >> + [INPUT_BUTTON_WHEELDOWN] = SDL_BUTTON(SDL_BUTTON_WHEELDOWN),
>> > Since SDL already spells the names without space, it's not the end of
>> > the world if we do likewise.
>> Good point.
>> Even if we adopt SDL's spelling WHEELUP and WHEELDOWN, I'd still prefer
>> to downcase the QAPI names for consistency with the rest of QAPI.
> This doesn't look too bad. And even if x-input-send-event isn't
> official api I'd prefer to not break it for such a minor cosmetic issue.
To slow our slide into a morass of inconsistency, I intend to make
qapi.py enforce naming conventions. Involves a whitelist for existing
violators we can't or won't fix. Naturally, I'd prefer to keep the list
as short as possible.
I feel these ones can and should be fixed, and the best time to fix them
is when we drop the x- from the command.
But if you insist on keeping the current names then, I'll live with the
extra whitelist entries.
Re: [Qemu-block] [Qemu-devel] [PATCH v11 19/28] qapi: Change munging of CamelCase enum values, Eric Blake, 2015/11/13