aboutsummaryrefslogtreecommitdiff
path: root/include/qom
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2023-11-09 18:42:38 +0100
committerKevin Wolf <kwolf@redhat.com>2023-11-10 18:19:14 +0100
commit125062e791258c68109f3a59cb7aca3dadbdb5a3 (patch)
treee1bf572c3cdd665417572af3f3bbc72cd36191a0 /include/qom
parent670581f932d9415e843de8a5e31e041938248237 (diff)
downloadqemu-125062e791258c68109f3a59cb7aca3dadbdb5a3.zip
qemu-125062e791258c68109f3a59cb7aca3dadbdb5a3.tar.gz
qemu-125062e791258c68109f3a59cb7aca3dadbdb5a3.tar.bz2
qom: Add object_property_set_default_list()
This function provides a default for properties that are accessed using the list visitor interface. The default is always an empty list. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-ID: <20231109174240.72376-10-kwolf@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/qom')
-rw-r--r--include/qom/object.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/qom/object.h b/include/qom/object.h
index ef7258a..afccd24 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -1094,6 +1094,14 @@ void object_property_set_default_bool(ObjectProperty *prop, bool value);
void object_property_set_default_str(ObjectProperty *prop, const char *value);
/**
+ * object_property_set_default_list:
+ * @prop: the property to set
+ *
+ * Set the property default value to be an empty list.
+ */
+void object_property_set_default_list(ObjectProperty *prop);
+
+/**
* object_property_set_default_int:
* @prop: the property to set
* @value: the value to be written to the property