From nobody Sun Feb 8 21:11:43 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1641894820; cv=none; d=zohomail.com; s=zohoarc; b=ZNtsbM+CWfuu/FPp01ywjZqo90OYhqMJoBhH75ZGv29oJHsnLQ8TsWE3zGkl04fXpCyB04NukZXA6qIFGFpmp12TqLVuke976rkM801/0VNyow90kMwo2rzfClJEBMmKgDE1MMewoyOksW8gA7J82htkXLFSLsH6Ait7qTOixV8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641894820; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=clvSosNCv8FTIv/wss4lIBl5Du0CYYbXDr0afo5MAgA=; b=L0oLP3V9gYmULg71zFAItHlHm1aZwlmS9gHwdSM2SbD6vu5A7Fspbw4p9/F8xVSwv/OpkRWPgi5/Nboi9MiRKfX6chxeAZQv5gCTZCYAg3gAOcdpI39rK7OP8VP/DQLqaZx7R6Ed5UYflV5CR/hH3BUznoBdMSWemBlrtvjUjzs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1641894820887469.7432257973119; Tue, 11 Jan 2022 01:53:40 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-316-o51FgEVINXKVAnHw1gf-xg-1; Tue, 11 Jan 2022 04:53:36 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7A13D100CCDB; Tue, 11 Jan 2022 09:53:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 13FAA7E11D; Tue, 11 Jan 2022 09:53:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C906B4A7C8; Tue, 11 Jan 2022 09:53:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20B9rRjk002594 for ; Tue, 11 Jan 2022 04:53:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1772410550B1; Tue, 11 Jan 2022 09:53:27 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 70A221059154 for ; Tue, 11 Jan 2022 09:53:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641894819; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=clvSosNCv8FTIv/wss4lIBl5Du0CYYbXDr0afo5MAgA=; b=GqPysyRNonwpiL64Uw57FyW7jSt9Q+ZHSEHMB+0QXNsKw/pdHTYNU+/G5K4PqHnhIo8G77 naFjf9N2LQjDKToMu89oqGENlFr+whPcyhhHg0xIRSog68ONRAqbeCxN/G0Qgn7VhndObz moQ+NI/wWt5Peh3VMjlGreeJfWr1vGI= X-MC-Unique: o51FgEVINXKVAnHw1gf-xg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/3] conf: moment: Export helpers to create the virDomainMoment wrapper Date: Tue, 11 Jan 2022 10:53:21 +0100 Message-Id: <4cf97bc48bbf42fb0ecc2d1dd41e21278c0f365d.1641894644.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1641894821420100001 Content-Type: text/plain; charset="utf-8" Export 'virDomainMomentObjNew' and 'virDomainMomentObjFree' and define the latter as autoptr cleanup function for 'virDomainMomentObj'. Signed-off-by: Peter Krempa --- src/conf/virdomainmomentobjlist.c | 4 ++-- src/conf/virdomainmomentobjlist.h | 8 ++++++++ src/libvirt_private.syms | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/conf/virdomainmomentobjlist.c b/src/conf/virdomainmomentob= jlist.c index 60f7eec106..8993c2310b 100644 --- a/src/conf/virdomainmomentobjlist.c +++ b/src/conf/virdomainmomentobjlist.c @@ -205,7 +205,7 @@ virDomainMomentMoveChildren(virDomainMomentObj *from, } -static virDomainMomentObj * +virDomainMomentObj * virDomainMomentObjNew(void) { virDomainMomentObj *moment; @@ -218,7 +218,7 @@ virDomainMomentObjNew(void) } -static void +void virDomainMomentObjFree(virDomainMomentObj *moment) { if (!moment) diff --git a/src/conf/virdomainmomentobjlist.h b/src/conf/virdomainmomentob= jlist.h index e42f9a7e9e..d2ab3b46b1 100644 --- a/src/conf/virdomainmomentobjlist.h +++ b/src/conf/virdomainmomentobjlist.h @@ -50,6 +50,14 @@ struct _virDomainMomentObj { virDomainMomentObj *first_child; /* NULL if no children */ }; +virDomainMomentObj * +virDomainMomentObjNew(void); + +void +virDomainMomentObjFree(virDomainMomentObj *moment); + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainMomentObj, virDomainMomentObjFree); + int virDomainMomentForEachChild(virDomainMomentObj *moment, virHashIterator iter, diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index ee14b99d88..5b76e66e61 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1175,6 +1175,8 @@ virDomainMomentDropParent; virDomainMomentForEachChild; virDomainMomentForEachDescendant; virDomainMomentMoveChildren; +virDomainMomentObjFree; +virDomainMomentObjNew; # conf/virdomainobjlist.h --=20 2.31.1