mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-21 17:11:57 -06:00
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>
This commit is contained in:
parent
254bf807e5
commit
b38dd678a2
14 changed files with 186 additions and 0 deletions
|
@ -67,6 +67,15 @@ static inline void qobject_incref(QObject *obj)
|
|||
obj->refcnt++;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue