diff options
| author | Max Reitz <mreitz@redhat.com> | 2017-11-14 19:01:25 +0100 |
|---|---|---|
| committer | Max Reitz <mreitz@redhat.com> | 2017-11-17 18:21:30 +0100 |
| commit | b38dd678a21582e03ecd2dec76ccf8290455628a (patch) | |
| tree | 1076a9bc7235d44314418bb7ef140685692e999e /include/qapi/qmp/qobject.h | |
| parent | 254bf807e5354c7b424d6fc28cb17c4f9ba43e35 (diff) | |
| download | focaccia-qemu-b38dd678a21582e03ecd2dec76ccf8290455628a.tar.gz focaccia-qemu-b38dd678a21582e03ecd2dec76ccf8290455628a.zip | |
qapi: Add qobject_is_equal()
This generic function (along with its implementations for different types) determines whether two QObjects are equal. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 20171114180128.17076-4-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include/qapi/qmp/qobject.h')
| -rw-r--r-- | include/qapi/qmp/qobject.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/qapi/qmp/qobject.h b/include/qapi/qmp/qobject.h index ef1d1a9237..38ac68845c 100644 --- a/include/qapi/qmp/qobject.h +++ b/include/qapi/qmp/qobject.h @@ -68,6 +68,15 @@ static inline void qobject_incref(QObject *obj) } /** + * qobject_is_equal(): Return whether the two objects are equal. + * + * Any of the pointers may be NULL; return true if both are. Always + * return false if only one is (therefore a QNull object is not + * considered equal to a NULL pointer). + */ +bool qobject_is_equal(const QObject *x, const QObject *y); + +/** * qobject_destroy(): Free resources used by the object */ void qobject_destroy(QObject *obj); |