From nobody Tue Feb 10 15:01:12 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=1649159019; cv=none; d=zohomail.com; s=zohoarc; b=TsrdzwBAKuW5rhKUxTLDbDF0mvAZll2u9P6nT+2HZLHnlKtFjgPrMcnnp9DVJ8glFFoIDdIfq5+Su70KiN4WSWAP0nqR+x0xNGK7c2BBINR7K40bCfMyNbis86CMVhE6eor6OlK584KboRKItBvS6CZqYdlZ8EYLeluE1IRqPcg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649159019; 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=6491wUJVkozUsTzr9DyHMvB0UL21GL4KqkNBBhaQI7U=; b=P65RO7vT8Oj9UZyFfnPxxRlB5Y+4LjYynrqVDsaylss51XDKzbKcPIlw4VYl6rlDXBNg58hUOoFN5wut9SeT8Qzfuw5IaY4ETGR/v7zNCT/pwnyGSEkWKq6Pg8o8uO4+Be+Pi/HK0RBGLmkN5lvX4iDHHTKJeZ7deVadZhwtNv8= 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 1649159019062625.5510021166978; Tue, 5 Apr 2022 04:43:39 -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-323-g4pG8hmJP26gOZcBYNaYBQ-1; Tue, 05 Apr 2022 07:43:32 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 88763100BAB2; 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 743FF58BCAC; 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 4D11D1940376; 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 813621940346 for ; Tue, 5 Apr 2022 11:43:29 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 50BF140CF8F2; Tue, 5 Apr 2022 11:43:29 +0000 (UTC) Received: from tapioca.home (unknown [10.40.192.235]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8552040CF8EE for ; Tue, 5 Apr 2022 11:43:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649159018; 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=6491wUJVkozUsTzr9DyHMvB0UL21GL4KqkNBBhaQI7U=; b=NWn5feZES8OHHlSxl4tQal6tMDq9bOco+7nJ4wjS3WDAjnxdddQn0HJmthaI0Mi/zwCHAE GwRg1nwZ22aIUaazdK0N3egmLB4a09VQjuPlPixNMKsArpTo7/F0bOtySG2dwwU7coLjaq tdEn0lyWZtWUHiNYAe13109wStDTabQ= X-MC-Unique: g4pG8hmJP26gOZcBYNaYBQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Victor Toso To: libvir-list@redhat.com Subject: [PATCH v1 3/4] scripts: apibuild: parse 'Since' for macros Date: Tue, 5 Apr 2022 13:43:22 +0200 Message-Id: <20220405114323.33153-4-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.10 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: 1649159019540100004 Content-Type: text/plain; charset="utf-8"; x-default="true" This patch adds 'version' parameter to the generated XML API for macros It'll require, for new additions, to add a comment with the version that the macro 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-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -2139,6 +2139,8 @@ int virDomainGetVcpus (virDomainPtr domain, * virDomainPinVcpu() APIs. VIR_COPY_CPUMAP macro extracts the cpumap of * the specified vcpu from cpumaps array and copies it into cpumap to be us= ed * later by virDomainPinVcpu() API. + * + * Since 0.1.10 */ # define VIR_COPY_CPUMAP(cpumaps, maplen, vcpu, cpumap) \ memcpy(cpumap, VIR_GET_CPUMAP(cpumaps, maplen, vcpu), maplen) ``` ```xml ... ``` Signed-off-by: Victor Toso --- scripts/apibuild.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index bafde0e0ab..1235e75999 100755 --- a/scripts/apibuild.py +++ b/scripts/apibuild.py @@ -2265,11 +2265,15 @@ class docBuilder: output.write(" string=3D'%s'" % strValue) else: output.write(" raw=3D'%s'" % escape(rawValue)) + + (comment, since) =3D self.retrieve_comment_tags(name, desc) + if len(since) > 0: + output.write(" version=3D'%s'" % escape(since)) output.write(">\n") =20 - if desc is not None and desc !=3D "": - output.write(" \n" % (desc)) - self.indexString(name, desc) + if comment is not None and comment !=3D "": + output.write(" \n" % (comment)) + self.indexString(name, comment) for arg in args: (name, desc) =3D arg if desc is not None and desc !=3D "": --=20 2.35.1