From nobody Tue Feb 10 09:24:22 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=1650481886; cv=none; d=zohomail.com; s=zohoarc; b=ITAI86uY9NJih3U32QrAlvMG7xajp86ZHksm2734KU3727m/ArGen5s0Zly72ziVc6sfwOeffEREW3+p5CvCF1yfj/PZ2IAVNOC73YrQgcloVHIuN5kGFCsME5Ui+pWCYy3WqdIHwP0TY93Qu68LbZ2j7O8Vj+bvbY05rYNte9M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1650481886; 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=KK3Q83tIVFaZlat3KfsaCO71sLZ7eIq9owzrnpIQyzQ=; b=AypTFY2hiObn3VyYAoBrS30wksJw1QdBQI4v/FZnS87ff2m9TnqEYNbXrFMPrALpmYE6o6EfAt3Ox7OOt9vCUCDRpcD8PEdXvZFo8TCMd0lKyjnaqqkKnuE15RsKtKqODGfqPagJxwUfccGiFZDqkkUhQ8GPnYzjLsEgDC4RWaQ= 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 1650481886690806.8215970039929; Wed, 20 Apr 2022 12:11:26 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-388-6CDFxnjZNBGyAGUkDe-fLQ-1; Wed, 20 Apr 2022 15:08:59 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 09C1D3C16197; Wed, 20 Apr 2022 19:08:51 +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 E2289111E3FA; Wed, 20 Apr 2022 19:08:50 +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 A4AC71940351; Wed, 20 Apr 2022 19:08:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E5E20194035A for ; Wed, 20 Apr 2022 19:08:47 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B39E9551E85; Wed, 20 Apr 2022 19:08:47 +0000 (UTC) Received: from tapioca.home (unknown [10.40.193.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C6BC551E82 for ; Wed, 20 Apr 2022 19:08:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650481885; 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=KK3Q83tIVFaZlat3KfsaCO71sLZ7eIq9owzrnpIQyzQ=; b=R4HfJO4hLt6Q3oehC5EhsglNMjUTjt4cSIBiwoSsw4/eL/WshbRDDTtRXjKXoQaPmVaOmW 5XuQurEbNOiGMm2b3zGTQ2lhmTQj9muCUsUkgvEaiozkDXqrOJWjY5wmq6kr7/ZdQnlJK5 cLqZga9LieGugnxQNyGLFX00oMaxUFY= X-MC-Unique: 6CDFxnjZNBGyAGUkDe-fLQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Victor Toso To: libvir-list@redhat.com Subject: [PATCH v3 25/30] scripts: apibuild: parse 'Since' for typedefs Date: Wed, 20 Apr 2022 21:08:14 +0200 Message-Id: <20220420190819.3093205-26-victortoso@redhat.com> In-Reply-To: <20220420190819.3093205-1-victortoso@redhat.com> References: <20220420190819.3093205-1-victortoso@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 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.78 on 10.11.54.3 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: 1650481887313100001 Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Victor Toso --- scripts/apibuild.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index ddc2fff7af..24ca98bd1c 100755 --- a/scripts/apibuild.py +++ b/scripts/apibuild.py @@ -2298,9 +2298,11 @@ class docBuilder: =20 def serialize_typedef(self, output, name): id =3D self.idx.typedefs[name] + (since, comment) =3D self.retrieve_comment_tags(name, id.extra) + version_tag =3D len(since) > 0 and f" version=3D'{since}'" or "" if id.info[0:7] =3D=3D 'struct ': - output.write(" \n") else: - output.write(" \n \n" = % (desc)) + if comment is not None and comment !=3D "": + output.write(">\n \n" = % (comment)) output.write(" \n") else: output.write("/>\n") --=20 2.35.1