From 6c6084c1b0802f5265d5c7dc27f7125d9fd1cceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= 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 --- qobject/qlit.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qobject/qlit.c') diff --git a/qobject/qlit.c b/qobject/qlit.c index ae2787ef35..07ad6b05e8 100644 --- a/qobject/qlit.c +++ b/qobject/qlit.c @@ -50,6 +50,8 @@ bool qlit_equal_qobject(const QLitObject *lhs, const QObject *rhs) } switch (lhs->type) { + case QTYPE_QBOOL: + return lhs->value.qbool == qbool_get_bool(qobject_to_qbool(rhs)); case QTYPE_QNUM: g_assert(qnum_get_try_int(qobject_to_qnum(rhs), &val)); return lhs->value.qnum == val; @@ -81,6 +83,8 @@ bool qlit_equal_qobject(const QLitObject *lhs, const QObject *rhs) return helper.result; } + case QTYPE_QNULL: + return true; default: break; } -- cgit v1.2.3