Skip to content

qobject: Make conversion from QObject * accept null

Markus Armbruster qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6qobject: Drop QObject_HEADinclude/qapi/qmp/qbool.h include/qapi/qmp/qdict.h include/qapi/qmp/qfloat.h +4 more+6 -101 reply
2/6qbool: Make conversion from QObject * accept nullqapi/qmp-input-visitor.c qobject/qbool.c qobject/qdict.c+8 -131 reply
3/6qdict: Make conversion from QObject * accept nullqga/main.c qobject/qdict.c+6 -111 reply
4/6qfloat qint: Make conversion from QObject * accept nullqapi/qmp-input-visitor.c qobject/qdict.c qobject/qfloat.c +1 more+23 -241 reply
5/6qlist: Make conversion from QObject * accept nullqobject/qlist.c+1 -21 reply
6/6qstring: Make conversion from QObject * accept nullqapi/qmp-input-visitor.c qobject/qdict.c qobject/qstring.c+8 -131 reply

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEric BlakeLuiz Capitulino
SeriesR-b
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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(-)
Signature · 1 line
2.4.3