From nobody Tue Feb 10 12:39:50 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=1649969474; cv=none; d=zohomail.com; s=zohoarc; b=HYGw+pk3ghv6weBRWv0DnOnoFgtENT14tlVcoJyreGjl9aw964Cpj7fqsuDDtL94y+pUNAf7ZgqUZXVGAnEnP8I4Q5Bj7ScwoPQh56yQEQLOkgqp0d9QCfN1d/tBh4rh5HEdXp6NKvU0V86z4TQ7EclCCLo+xXlruFCST0FZKtg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649969474; 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=yPpqkqIFMLXR93dubP2IaKAcFMv4TsgSlB895MNYS8k=; b=SOXJqemwwLjgyyi+z9+1mhIucikRAZ4DTUttK2RTg8Rvz/jsIuT8sMYiomiveEI+X6UqlDOK6EjGtJW89hkg529ZO5DB2Y85rrRrE6mn9moGkfqXl5oiF7YhfllXzT4phcA1+RE8P1QZM8RhHSZzI8mr4GxItaQVzY8uchYXqXU= 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 1649969474937977.7302179465174; Thu, 14 Apr 2022 13:51:14 -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-321-gjP8yxLdPIaveJKOZ79R1A-1; Thu, 14 Apr 2022 16:51:10 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3AA64857C84; Thu, 14 Apr 2022 20:50:48 +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 0DB1948FB13; Thu, 14 Apr 2022 20:50:48 +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 3FE37194034A; Thu, 14 Apr 2022 20:50:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D5989194037C for ; Thu, 14 Apr 2022 20:50:45 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C55C12167D6B; Thu, 14 Apr 2022 20:50:45 +0000 (UTC) Received: from tapioca.home (unknown [10.40.193.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 44C6E2167D68 for ; Thu, 14 Apr 2022 20:50:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649969473; 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=yPpqkqIFMLXR93dubP2IaKAcFMv4TsgSlB895MNYS8k=; b=froGUx2NcwXpWrcosoXyXG4xXmnVzzr3HHtFfROKr9QwO9hKtbxPXzi171oxxZuKT0e3LP dQkGGj4uzu4JZvP/D8Pw3SxuRzUtFhE9b3OFhkNoW2pWusJRsmNe5QHRMZ81s4msc2Xi8g hfOVE997YglXdEk3wtbT6sFDxOGo4LA= X-MC-Unique: gjP8yxLdPIaveJKOZ79R1A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Victor Toso To: libvir-list@redhat.com Subject: [PATCH v2 27/34] scripts: apibuild: parse 'Since' for typedefs Date: Thu, 14 Apr 2022 22:47:38 +0200 Message-Id: <20220414204745.108966-28-victortoso@redhat.com> In-Reply-To: <20220414204745.108966-1-victortoso@redhat.com> References: <20220414204745.108966-1-victortoso@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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.9 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: 1649969477094100003 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. 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 5335670c1c..da70d67fa6 100755 --- a/scripts/apibuild.py +++ b/scripts/apibuild.py @@ -2296,9 +2296,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