From nobody Tue Feb 10 15:01:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1649159017; cv=none; d=zohomail.com; s=zohoarc; b=YA7ilmIZ34uQtm2ItqOAF7urFOsFyYv7P5LJIzzvt3KDAH0H4Y4i/cMO421TD1X6kXX4i4wH09pZKBFsKZxNRySCq0v7eANFcikRQVt2B3AKKv0ZQQ4hD3k419NRRyLZsDT62k5WVXzQuqZw1cdnOJKLUsKBoHLEgWtUlqK3h/U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649159017; 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=0vEK02GwKyX2VzoTzDHvbP2ihIDvIteSJiQDY2hSyCE=; b=fNR60EMxR8rvVFjO+qYcj2hHWdypL1Xt6Nz9UleoKyB8Wpm6W/eD7AZMj18IzFNWuxY+TPrWFCufQSnZ6hRVefX/vMucgn5tb9Z4roqm5q6aJt5L4UTsY/jCCqcYSLzUMoFPDQkTJ+ywK5JOrdRB89YjSu15N0WBfuTguoYQCVg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1649159017777596.3968601499903; Tue, 5 Apr 2022 04:43:37 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-547-3m0YiO46OuWWmq_pkWaaRA-1; Tue, 05 Apr 2022 07:43:32 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 65DCC18A6582; Tue, 5 Apr 2022 11:43:30 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 52ABBC44AE2; Tue, 5 Apr 2022 11:43:30 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 32BD21940346; Tue, 5 Apr 2022 11:43:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 362E61940346 for ; Tue, 5 Apr 2022 11:43:28 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2306A400F75F; Tue, 5 Apr 2022 11:43:28 +0000 (UTC) Received: from tapioca.home (unknown [10.40.192.235]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7F9CD40CF8EE for ; Tue, 5 Apr 2022 11:43:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649159016; 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=0vEK02GwKyX2VzoTzDHvbP2ihIDvIteSJiQDY2hSyCE=; b=YiwYRfteZUlpmDJA0Un1FS6+5BMfX4DAEGzmo18466XTvxqyUAuBhH5jUKfSp3UFoIlcVo MxgQr+tttk+aThiJEpMBHFgOr2wN1ilcL0VQMR9LPb3OxnDHSQb26qQUoz22etLJE+O3jr 0TSpSpFncPFMHNr7xhi/Ri0gQliDCwE= X-MC-Unique: 3m0YiO46OuWWmq_pkWaaRA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Victor Toso To: libvir-list@redhat.com Subject: [PATCH v1 2/4] scripts: apibuild: parse 'Since' for typedefs Date: Tue, 5 Apr 2022 13:43:21 +0200 Message-Id: <20220405114323.33153-3-victortoso@redhat.com> In-Reply-To: <20220405114323.33153-1-victortoso@redhat.com> References: <20220405114323.33153-1-victortoso@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 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: 1649159019545100005 Content-Type: text/plain; charset="utf-8"; x-default="true" This patch adds 'version' parameter to the generated XML API for typedefs It'll require, for new additions, to add a comment with the version that the typedef value was added. An example bellow of code diff and the change in the generated XML. Note that the Since tag is removed from the comment as there is a proper field for it in the XML. ```diff --- a/include/libvirt/libvirt-host.h +++ b/include/libvirt/libvirt-host.h @@ -41,6 +41,8 @@ typedef struct _virConnect virConnect; * * a virConnectPtr is pointer to a virConnect private structure, this is t= he * type used to reference a connection to the Hypervisor in the API. + * + * Since 0.0.1 */ typedef virConnect *virConnectPtr; ``` ```xml ``` Signed-off-by: Victor Toso --- scripts/apibuild.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index cb68d1b970..bafde0e0ab 100755 --- a/scripts/apibuild.py +++ b/scripts/apibuild.py @@ -2324,9 +2324,11 @@ class docBuilder: output.write(" \n \n" = % (desc)) + (comment, since) =3D self.retrieve_comment_tags(name, id.e= xtra) + if len(since) > 0: + output.write(" version=3D'%s'" % escape(since)) + if comment is not None and comment !=3D "": + output.write(">\n \n" = % (comment)) output.write(" \n") else: output.write("/>\n") --=20 2.35.1