From e7cce67f27bce49d8b6d09f4e66059d1fd117ebb Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 2 May 2012 13:30:54 +0200 Subject: qom: Add object_class_get_parent() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This simple bit of functionality was missing and we'll need it soon, so add it. Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori [AF: Document possible NULL return value] Signed-off-by: Andreas Färber --- include/qemu/object.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/qemu/object.h b/include/qemu/object.h index d93b77293f..487559c5c0 100644 --- a/include/qemu/object.h +++ b/include/qemu/object.h @@ -547,6 +547,14 @@ ObjectClass *object_class_dynamic_cast_assert(ObjectClass *klass, ObjectClass *object_class_dynamic_cast(ObjectClass *klass, const char *typename); +/** + * object_class_get_parent: + * @klass: The class to obtain the parent for. + * + * Returns: The parent for @klass or %NULL if none. + */ +ObjectClass *object_class_get_parent(ObjectClass *klass); + /** * object_class_get_name: * @klass: The class to obtain the QOM typename for. -- cgit v1.2.3