summaryrefslogtreecommitdiffstats
path: root/include/qom
diff options
context:
space:
mode:
authorMarc-André Lureau2020-01-10 16:30:31 +0100
committerPaolo Bonzini2020-01-24 20:59:14 +0100
commitb77ade9bb37b2e9813a42008cb21d0c743aa50a1 (patch)
tree97de7f3a5680ce1d1759ac72eee970690cc52bf7 /include/qom
parentobject: release all props (diff)
downloadqemu-b77ade9bb37b2e9813a42008cb21d0c743aa50a1.tar.gz
qemu-b77ade9bb37b2e9813a42008cb21d0c743aa50a1.tar.xz
qemu-b77ade9bb37b2e9813a42008cb21d0c743aa50a1.zip
object: return self in object_ref()
This allow for simpler assignment with ref: foo = object_ref(bar) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200110153039.1379601-19-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qom')
-rw-r--r--include/qom/object.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/qom/object.h b/include/qom/object.h
index 5e2f60d4b0..18660fde1c 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -1005,8 +1005,9 @@ GSList *object_class_get_list_sorted(const char *implements_type,
*
* Increase the reference count of a object. A object cannot be freed as long
* as its reference count is greater than zero.
+ * Returns: @obj
*/
-void object_ref(Object *obj);
+Object *object_ref(Object *obj);
/**
* object_unref: