aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBharata B Rao <bharata@linux.vnet.ibm.com>2016-06-10 06:29:00 +0530
committerDavid Gibson <david@gibson.dropbear.id.au>2016-06-17 16:33:48 +1000
commit3f97b53a682d2595747c926c00d78b9d406f1be0 (patch)
tree0f3e8c729f12696b1048cd33b726f6ae86bafc75 /include
parentaab99135b63522267c6fdae04712cb2f02c8c7de (diff)
qom: API to get instance_size of a type
Add an API object_type_get_size(const char *typename) that returns the instance_size of the give typename. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include')
-rw-r--r--include/qom/object.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/qom/object.h b/include/qom/object.h
index 99de539e7c..2f8ac47c7c 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -1607,5 +1607,11 @@ int object_child_foreach_recursive(Object *obj,
*/
Object *container_get(Object *root, const char *path);
-
+/**
+ * object_type_get_instance_size:
+ * @typename: Name of the Type whose instance_size is required
+ *
+ * Returns the instance_size of the given @typename.
+ */
+size_t object_type_get_instance_size(const char *typename);
#endif