[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 10/11] qerror: switch to qapi generated error ma
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 10/11] qerror: switch to qapi generated error macros and table |
Date: |
Thu, 26 Jul 2012 13:56:00 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.97 (gnu/linux) |
Luiz Capitulino <address@hidden> writes:
> Previous commits added qapi infrastructure to automatically generate
> qerror macros and the qerror table from qapi-schema-errors.json.
>
> This commit drops the current error macros from qerror.h and the error
> table from qerror.c and use the generated ones instead.
>
> Please, note that qapi-error.c is actually _included_ by qerror.c.
> This is hacky, but the alternative is to make the table private to
> qapi-error.c and generate functions to return table entries. I think that
> doesn't pay much off.
Functions? Why can't you simply put
const QErrorStringTable qerror_table[NUMBER_OF_ERRORS];
into qapi-errors.h?
With a literal number instead of NUMBER_OF_ERRORS. If you suffer from
literal-phobia, you can also #define it instead.
- Re: [Qemu-devel] [PATCH 07/11] qapi: qapi.py: allow the "'" character be escaped, (continued)
- Re: [Qemu-devel] [PATCH 07/11] qapi: qapi.py: allow the "'" character be escaped, Markus Armbruster, 2012/07/26
- Re: [Qemu-devel] [PATCH 07/11] qapi: qapi.py: allow the "'" character be escaped, Luiz Capitulino, 2012/07/26
- Re: [Qemu-devel] [PATCH 07/11] qapi: qapi.py: allow the "'" character be escaped, Markus Armbruster, 2012/07/26
- [Qemu-devel] [PATCH] fixup! qapi: qapi.py: allow the "'" character be escaped, Markus Armbruster, 2012/07/26
- Re: [Qemu-devel] [PATCH] fixup! qapi: qapi.py: allow the "'" character be escaped, Peter Maydell, 2012/07/26
[Qemu-devel] [PATCH 06/11] qerror: QERR_AMBIGUOUS_PATH: drop %(object) from human msg, Luiz Capitulino, 2012/07/25
[Qemu-devel] [PATCH 01/11] qerror: rename QERR_SOCKET_* macros, Luiz Capitulino, 2012/07/25
[Qemu-devel] [PATCH 10/11] qerror: switch to qapi generated error macros and table, Luiz Capitulino, 2012/07/25
- Re: [Qemu-devel] [PATCH 10/11] qerror: switch to qapi generated error macros and table,
Markus Armbruster <=