From 6c6084c1b0802f5265d5c7dc27f7125d9fd1cceb Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 25 Aug 2017 12:59:07 +0200 Subject: qlit: add QLIT_QNULL and QLIT_BOOL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As they are going to be used in the following patches. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Message-Id: <20170825105913.4060-9-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster --- include/qapi/qmp/qlit.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/qapi/qmp/qlit.h b/include/qapi/qmp/qlit.h index fc1a2d845d..b18406bce9 100644 --- a/include/qapi/qmp/qlit.h +++ b/include/qapi/qmp/qlit.h @@ -23,6 +23,7 @@ typedef struct QLitObject QLitObject; struct QLitObject { int type; union { + bool qbool; int64_t qnum; const char *qstr; QLitDictEntry *qdict; @@ -35,6 +36,10 @@ struct QLitDictEntry { QLitObject value; }; +#define QLIT_QNULL \ + { .type = QTYPE_QNULL } +#define QLIT_QBOOL(val) \ + { .type = QTYPE_QBOOL, .value.qbool = (val) } #define QLIT_QNUM(val) \ { .type = QTYPE_QNUM, .value.qnum = (val) } #define QLIT_QSTR(val) \ -- cgit v1.2.3