[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 07/10] qapi: implement conditional command arguments
From: |
Marc-André Lureau |
Subject: |
Re: [PATCH v3 07/10] qapi: implement conditional command arguments |
Date: |
Mon, 27 Feb 2023 15:22:08 +0400 |
Hi
On Wed, Feb 22, 2023 at 2:29 PM Marc-André Lureau
<marcandre.lureau@gmail.com> wrote:
>
> Hi
>
> On Wed, Feb 22, 2023 at 2:23 PM Markus Armbruster <armbru@redhat.com> wrote:
> > > Another option is to always pass a dummy last argument? :)
> > >
> > > void command(first,
> > > #ifdef A
> > > a,
> > > #endif
> > > #ifdef B
> > > b,
> > > #endif
> > > dummy)
> >
> > Yet another option:
> >
> > void command(first
> > #ifdef A
> > , a
> > #endif
> > #ifdef B
> > , b
> > #endif
> > )
> >
> > [...]
> >
>
> Since I think we always have a first argument, that might be indeed
> the best solution. I'll try that. thanks
>
Actually, this is just moving the problem to the first argument. (and
it also breaks clang-format, which doesn't have a allow-leading-commas
option or similar). So I'll just add an error when using conditional
fields/args last.
--
Marc-André Lureau
- Re: [PATCH v3 06/10] monitor: release the lock before calling close(), (continued)
- [PATCH v3 07/10] qapi: implement conditional command arguments, marcandre . lureau, 2023/02/07
- Re: [PATCH v3 07/10] qapi: implement conditional command arguments, Markus Armbruster, 2023/02/09
- Re: [PATCH v3 07/10] qapi: implement conditional command arguments, Markus Armbruster, 2023/02/17
- Re: [PATCH v3 07/10] qapi: implement conditional command arguments, Marc-André Lureau, 2023/02/18
- Re: [PATCH v3 07/10] qapi: implement conditional command arguments, Markus Armbruster, 2023/02/20
- Re: [PATCH v3 07/10] qapi: implement conditional command arguments, Marc-André Lureau, 2023/02/22
- Re: [PATCH v3 07/10] qapi: implement conditional command arguments, Markus Armbruster, 2023/02/22
- Re: [PATCH v3 07/10] qapi: implement conditional command arguments, Marc-André Lureau, 2023/02/22
- Re: [PATCH v3 07/10] qapi: implement conditional command arguments,
Marc-André Lureau <=
- Re: [PATCH v3 07/10] qapi: implement conditional command arguments, Eric Blake, 2023/02/28
Re: [PATCH v3 07/10] qapi: implement conditional command arguments, Eric Blake, 2023/02/28
[PATCH v3 08/10] qmp: teach 'getfd' to import sockets on win32, marcandre . lureau, 2023/02/07