qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/6] qobject: Make conversion from QObject * accept null
@ 2015-10-15 14:15 Markus Armbruster
  2015-10-15 14:15 ` [Qemu-devel] [PATCH 1/6] qobject: Drop QObject_HEAD Markus Armbruster
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Markus Armbruster @ 2015-10-15 14:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: mdroth, lcapitulino

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-10-22 12:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 14:15 [Qemu-devel] [PATCH 0/6] qobject: Make conversion from QObject * accept null Markus Armbruster
2015-10-15 14:15 ` [Qemu-devel] [PATCH 1/6] qobject: Drop QObject_HEAD Markus Armbruster
2015-10-15 15:24   ` Eric Blake
2015-10-15 14:15 ` [Qemu-devel] [PATCH 2/6] qbool: Make conversion from QObject * accept null Markus Armbruster
2015-10-15 15:27   ` Eric Blake
2015-10-15 14:15 ` [Qemu-devel] [PATCH 3/6] qdict: " Markus Armbruster
2015-10-15 15:30   ` Eric Blake
2015-10-15 14:15 ` [Qemu-devel] [PATCH 4/6] qfloat qint: " Markus Armbruster
2015-10-15 16:09   ` Eric Blake
2015-10-15 14:15 ` [Qemu-devel] [PATCH 5/6] qlist: " Markus Armbruster
2015-10-15 16:10   ` Eric Blake
2015-10-15 14:15 ` [Qemu-devel] [PATCH 6/6] qstring: " Markus Armbruster
2015-10-15 16:11   ` Eric Blake
2015-10-15 16:06 ` [Qemu-devel] [PATCH 0/6] qobject: " Luiz Capitulino
2015-10-22 12:20   ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).