[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 00/25] Monitor handlers new structure phase 1
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [PATCH v1 00/25] Monitor handlers new structure phase 1 |
Date: |
Mon, 10 Aug 2009 17:42:13 -0300 |
On Mon, 10 Aug 2009 15:17:03 -0500
Anthony Liguori <address@hidden> wrote:
> Luiz Capitulino wrote:
> > Hi there,
> >
> > In the long QEMU Monitor Protocol (QMP) thread people have agreed that,
> > whichever protocol we are going to use, the first step that needs to be
> > done is to improve current Monitor's code, so that command handlers
> > support 'structured' input and output.
> >
>
> I think one of the goals was for there to be type safety. qdicts store
> void *s which is pretty clumsy.
Yes.
>
> I think you may be waiting to introduce QObject, but in the interim, you
> should at least introduce a boxed type and have proper accessors in
> qdict. For instance, instead of:
>
> int f = (long)qdict_get(foo, "bar");
>
> It should be:
>
> int f = qdict_get_int(foo, "bar");
It will be provided by the QObject patches I'm already
working on, why can't we wait for it?
The current code also stores handler arguments as void pointers
and does the casting when passing them as arguments.
So, unless you have caught a real bug in the series, I think
it's safe to merge it as is. This will contribute to have
QObject sooner. :)
Also, it's a good idea to get this tested before introducing
another layer on top of it.
- [Qemu-devel] [PATCH 16/25] monitor: Port handler_7 to use the dictionary, (continued)
- [Qemu-devel] [PATCH 16/25] monitor: Port handler_7 to use the dictionary, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 18/25] monitor: Port handler_10 to use the dictionary, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 19/25] monitor: Split monitor_handle_command(), Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 20/25] monitor: Add a new index for str_allocated[], Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 21/25] monitor: Drop args[] from monitor_parse_command(), Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 22/25] monitor: Drop 'nb_args' from monitor_parse_command(), Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 23/25] Add check support, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 24/25] Introduce dictionary test data file, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 25/25] Introduce QDict unit-tests, Luiz Capitulino, 2009/08/03
- Re: [Qemu-devel] [PATCH v1 00/25] Monitor handlers new structure phase 1, Anthony Liguori, 2009/08/10
- Re: [Qemu-devel] [PATCH v1 00/25] Monitor handlers new structure phase 1,
Luiz Capitulino <=