From patchwork Fri Jan 25 11:47:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 215672 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C646B2C0091 for ; Sat, 26 Jan 2013 00:26:51 +1100 (EST) Received: from localhost ([::1]:54363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyjIv-0007KQ-Il for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2013 08:26:49 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyjIj-0007JC-80 for qemu-devel@nongnu.org; Fri, 25 Jan 2013 08:26:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TyjIa-0006Rl-Pn for qemu-devel@nongnu.org; Fri, 25 Jan 2013 08:26:37 -0500 Received: from mail-qa0-f50.google.com ([209.85.216.50]:55500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tyhkp-0005DP-Or for qemu-devel@nongnu.org; Fri, 25 Jan 2013 06:47:31 -0500 Received: by mail-qa0-f50.google.com with SMTP id cr7so160156qab.16 for ; Fri, 25 Jan 2013 03:47:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=2OZwx/pzb1ly1v/XdzI1Z+IPFEqjC1DUJI0dzCDYJ5g=; b=X4jlnP/xAxOyvfsO8jLtC3DYjFSkrjtTmk+/RthOPvi6rQodgXdpTfjXoG+W/lJ/lq SAJg4WxX24J0Fr0xbr/or8inCI1vKuVIh408tNVeVoQmCJezerRbuG+EGCHx5X6BIXhz X3wUOUNKUSyJu2RjPBIzTi9TV/N2Fgio/mkf+wsBEPuOHjbfS72T/2opjCmV1DMuLsfO OjNE2v4gSopjlSK95bc14QU1qYSJp325/k5LvymcFkAFSFjaWxYdE/blBri+qUwOPBt0 3EO6gQmvzf0JZ58lo2jNoApA623CUjTpa/Tbg1cFTE70eGqc0B1TN+755RprPYTixfZu aHdA== X-Received: by 10.224.186.82 with SMTP id cr18mr5602063qab.64.1359114451227; Fri, 25 Jan 2013 03:47:31 -0800 (PST) Received: from yakj.usersys.redhat.com (93-34-179-137.ip50.fastwebnet.it. [93.34.179.137]) by mx.google.com with ESMTPS id eg9sm419389qab.7.2013.01.25.03.47.29 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 25 Jan 2013 03:47:30 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2013 12:47:00 +0100 Message-Id: <1359114420-16149-13-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1359114420-16149-1-git-send-email-pbonzini@redhat.com> References: <1359114420-16149-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.216.50 Cc: afaerber@suse.de Subject: [Qemu-devel] [PATCH v3 12/12] qom: remove object_delete X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This is now unused. Signed-off-by: Paolo Bonzini --- include/qom/object.h | 17 ++--------------- qom/object.c | 7 ------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index 5e8e528..2ac35a5 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -553,9 +553,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. */ @@ -565,24 +563,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 1a123da..aa89e21 100644 --- a/qom/object.c +++ b/qom/object.c @@ -417,13 +417,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)) {