From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgLq9-0000XC-FG for qemu-devel@nongnu.org; Wed, 05 Dec 2012 15:45:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TgLq7-0001Rl-BT for qemu-devel@nongnu.org; Wed, 05 Dec 2012 15:45:09 -0500 Received: from mail-ea0-f173.google.com ([209.85.215.173]:49597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgLq7-0001D6-08 for qemu-devel@nongnu.org; Wed, 05 Dec 2012 15:45:07 -0500 Received: by mail-ea0-f173.google.com with SMTP id i13so2322945eaa.4 for ; Wed, 05 Dec 2012 12:45:06 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 5 Dec 2012 21:44:42 +0100 Message-Id: <1354740282-20679-12-git-send-email-pbonzini@redhat.com> In-Reply-To: <1354740282-20679-1-git-send-email-pbonzini@redhat.com> References: <1354740282-20679-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 11/11] qom: remove object_delete List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, afaerber@suse.de This is now unused. Signed-off-by: Paolo Bonzini --- include/qemu/object.h | 17 ++--------------- qom/object.c | 7 ------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/include/qemu/object.h b/include/qemu/object.h index ed1f47f..c5169ee 100644 --- a/include/qemu/object.h +++ b/include/qemu/object.h @@ -455,9 +455,7 @@ struct InterfaceClass * object_new: * @typename: The name of the type of the object to instantiate. * - * This function will initialize a new object using heap allocated memory. This - * function should be paired with object_delete() to free the resources - * associated with the object. + * This function will initialize a new object using heap allocated memory. * * Returns: The newly allocated and instantiated object. */ @@ -467,24 +465,13 @@ Object *object_new(const char *typename); * object_new_with_type: * @type: The type of the object to instantiate. * - * This function will initialize a new object using heap allocated memory. This - * function should be paired with object_delete() to free the resources - * associated with the object. + * This function will initialize a new object using heap allocated memory. * * Returns: The newly allocated and instantiated object. */ Object *object_new_with_type(Type type); /** - * object_delete: - * @obj: The object to free. - * - * Finalize an object and then free the memory associated with it. This should - * be paired with object_new() to free the resources associated with an object. - */ -void object_delete(Object *obj); - -/** * object_initialize_with_type: * @obj: A pointer to the memory to be used for the object. * @type: The type of the object to instantiate. diff --git a/qom/object.c b/qom/object.c index ecdf164..e9212fd 100644 --- a/qom/object.c +++ b/qom/object.c @@ -416,13 +416,6 @@ Object *object_new(const char *typename) return object_new_with_type(ti); } -void object_delete(Object *obj) -{ - object_unparent(obj); - g_assert(obj->ref == 1); - object_unref(obj); -} - Object *object_dynamic_cast(Object *obj, const char *typename) { if (obj && object_class_dynamic_cast(object_get_class(obj), typename)) { -- 1.8.0.1