Re: [Qemu-devel] [PATCH 0/6] qobject: Make conversion from QObject * accept null

2015-10-22 Thread Markus Armbruster
Luiz Capitulino  writes:

> On Thu, 15 Oct 2015 16:15:31 +0200
> Markus Armbruster  wrote:
>
>> The qobject_to_FOO() crash on null, which is a trap for the unwary.
>> Return null instead, and simplify a few callers.
>> 
>> Throw in a patch to drop QObject_HEAD.
>> 
>> Luiz, I'm happy to take this through my tree, since got a QMP series
>> based on it (to be posted shortly).
>
> Please do.
>
> Reviewed-by: Luiz Capitulino 

Thanks!

> Btw, what do you think about this patch? :)

I knew I was playing with fire %-}

Right now I'm too swamped with QAPI patches to take on more.  Once we
flushed that queue, and got QAPI to quiet down a bit, I can take HMP and
QObject off you.



Re: [Qemu-devel] [PATCH 0/6] qobject: Make conversion from QObject * accept null

2015-10-15 Thread Luiz Capitulino
On Thu, 15 Oct 2015 16:15:31 +0200
Markus Armbruster  wrote:

> The qobject_to_FOO() crash on null, which is a trap for the unwary.
> Return null instead, and simplify a few callers.
> 
> Throw in a patch to drop QObject_HEAD.
> 
> Luiz, I'm happy to take this through my tree, since got a QMP series
> based on it (to be posted shortly).

Please do.

Reviewed-by: Luiz Capitulino 

Btw, what do you think about this patch? :)

diff --git a/MAINTAINERS b/MAINTAINERS
index 9bd2b8f..aa03f3d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1010,7 +1010,7 @@ F: qemu-timer.c
 F: vl.c
 
 Human Monitor (HMP)
-M: Luiz Capitulino 
+M: Markus Armbruster 
 S: Maintained
 F: monitor.c
 F: hmp.c
@@ -1073,7 +1073,7 @@ F: qapi/*.json
 T: git git://repo.or.cz/qemu/armbru.git qapi-next
 
 QObject
-M: Luiz Capitulino 
+M: Markus Armbruster 
 S: Maintained
 F: qobject/
 F: include/qapi/qmp/



[Qemu-devel] [PATCH 0/6] qobject: Make conversion from QObject * accept null

2015-10-15 Thread Markus Armbruster
The qobject_to_FOO() crash on null, which is a trap for the unwary.
Return null instead, and simplify a few callers.

Throw in a patch to drop QObject_HEAD.

Luiz, I'm happy to take this through my tree, since got a QMP series
based on it (to be posted shortly).

Markus Armbruster (6):
  qobject: Drop QObject_HEAD
  qbool: Make conversion from QObject * accept null
  qdict: Make conversion from QObject * accept null
  qfloat qint: Make conversion from QObject * accept null
  qlist: Make conversion from QObject * accept null
  qstring: Make conversion from QObject * accept null

 include/qapi/qmp/qbool.h   |  2 +-
 include/qapi/qmp/qdict.h   |  2 +-
 include/qapi/qmp/qfloat.h  |  2 +-
 include/qapi/qmp/qint.h|  2 +-
 include/qapi/qmp/qlist.h   |  2 +-
 include/qapi/qmp/qobject.h |  4 
 include/qapi/qmp/qstring.h |  2 +-
 qapi/qmp-input-visitor.c   | 40 ++--
 qga/main.c | 11 +++
 qobject/qbool.c|  4 ++--
 qobject/qdict.c| 39 ---
 qobject/qfloat.c   |  4 ++--
 qobject/qint.c |  4 ++--
 qobject/qlist.c|  3 +--
 qobject/qstring.c  |  4 ++--
 15 files changed, 52 insertions(+), 73 deletions(-)

-- 
2.4.3