qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 6/8] qlit: qlit_type() function


From: Marc-André Lureau
Subject: Re: [PATCH v2 6/8] qlit: qlit_type() function
Date: Tue, 17 Nov 2020 12:53:39 +0400



On Tue, Nov 17, 2020 at 2:48 AM Eduardo Habkost <ehabkost@redhat.com> wrote:
Useful function where we need to check for the qlit type before
converting it to an actual QObject.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com

---
 include/qapi/qmp/qlit.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/qapi/qmp/qlit.h b/include/qapi/qmp/qlit.h
index f9e356d31e..acddb80831 100644
--- a/include/qapi/qmp/qlit.h
+++ b/include/qapi/qmp/qlit.h
@@ -59,4 +59,9 @@ bool qlit_equal_qobject(const QLitObject *lhs, const QObject *rhs);

 QObject *qobject_from_qlit(const QLitObject *qlit);

+static inline QType qlit_type(const QLitObject *qlit)
+{
+    return qlit->type;
+}
+
 #endif /* QLIT_H */
--
2.28.0




--
Marc-André Lureau

reply via email to

[Prev in Thread] Current Thread [Next in Thread]