summaryrefslogtreecommitdiffstats
path: root/include/qapi/qmp/qobject.h
diff options
context:
space:
mode:
authorKevin Wolf2017-11-17 18:24:30 +0100
committerKevin Wolf2017-11-17 18:24:30 +0100
commitd5a49c6e7d9e42059450674ec845b7bc0d62cb7e (patch)
tree8f51bb1e380876bfa0a8310cd3ab0ed4d953efac /include/qapi/qmp/qobject.h
parentqcow2: fix image corruption on commit with persistent bitmap (diff)
parentiotests: Make 087 pass without AIO enabled (diff)
downloadqemu-d5a49c6e7d9e42059450674ec845b7bc0d62cb7e.tar.gz
qemu-d5a49c6e7d9e42059450674ec845b7bc0d62cb7e.tar.xz
qemu-d5a49c6e7d9e42059450674ec845b7bc0d62cb7e.zip
Merge remote-tracking branch 'mreitz/tags/pull-block-2017-11-17' into queue-block
Block patches for 2.11.0-rc2 # gpg: Signature made Fri Nov 17 18:22:07 2017 CET # gpg: using RSA key F407DB0061D5CF40 # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * mreitz/tags/pull-block-2017-11-17: iotests: Make 087 pass without AIO enabled block: Make bdrv_next() keep strong references qcow2: Fix overly broad madvise() qcow2: Refuse to get unaligned offsets from cache qcow2: Add bounds check to get_refblock_offset() block: Guard against NULL bs->drv qcow2: Unaligned zero cluster in handle_alloc() qcow2: check_errors are fatal qcow2: reject unaligned offsets in write compressed iotests: Add test for failing qemu-img commit tests: Add check-qobject for equality tests iotests: Add test for non-string option reopening block: qobject_is_equal() in bdrv_reopen_prepare() qapi: Add qobject_is_equal() qapi/qlist: Add qlist_append_null() macro qapi/qnull: Add own header Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/qapi/qmp/qobject.h')
-rw-r--r--include/qapi/qmp/qobject.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/include/qapi/qmp/qobject.h b/include/qapi/qmp/qobject.h
index eab29edd12..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);
@@ -93,16 +102,4 @@ static inline QType qobject_type(const QObject *obj)
return obj->type;
}
-struct QNull {
- QObject base;
-};
-
-extern QNull qnull_;
-
-static inline QNull *qnull(void)
-{
- QINCREF(&qnull_);
- return &qnull_;
-}
-
#endif /* QOBJECT_H */