From nobody Tue Feb 10 23:00:58 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=1650655513; cv=none; d=zohomail.com; s=zohoarc; b=Ewf7rmAmoHnbtTbL54/pMER85cLki2nnKcsacTTZSeCML0Qq8vOBL10rGsq1kANfo+IxNruZJdD6g/nnPeR65e44v/vns4GOZrSmLivvWKlAVubHrWKUZOEROmpAbknSkPyCslNTUB7HJGRZv3p8vZ1xNp+rpaJASBscWH58Bks= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1650655513; 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=DZTMu9Nsh7rKi1ffACnAyjKOAR5d0Woz8u1+3sgEm4g=; b=PMb3UgqCyg5mc+phQAKRVNm+KwQ/SifO8w03gAhzThOM2Uet96s6zY6V6Fgv8eXLVdM1QlsvYhRCcXhen+EwmpwvYTejsGcsCf0VmoBVHxrf9QEN6qf85rUi6Lhug2U/dVaXBKViXjdMqOGO50Itnw/QvJD41k/9sWSjBb9pJOg= 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 1650655513052985.4436463893247; Fri, 22 Apr 2022 12:25:13 -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-531-xi_82CEYNOaPbqwfRCWCVw-1; Fri, 22 Apr 2022 15:25:09 -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 8198B1018AA4; Fri, 22 Apr 2022 19:25:06 +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 2BC3141636D; Fri, 22 Apr 2022 19:25:06 +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 BA52D1940352; Fri, 22 Apr 2022 19:25:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D83561940352 for ; Fri, 22 Apr 2022 19:25:04 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B8CEB200B41A; Fri, 22 Apr 2022 19:25:04 +0000 (UTC) Received: from tapioca.home (unknown [10.40.194.99]) by smtp.corp.redhat.com (Postfix) with ESMTP id 225BB200E287 for ; Fri, 22 Apr 2022 19:24:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650655512; 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=DZTMu9Nsh7rKi1ffACnAyjKOAR5d0Woz8u1+3sgEm4g=; b=Yc0azaY7veHMWbhgpyVZtcQSlpmdBv5h3JCD0cP6FEPCqz0EBc94zuSRCy5f6NVoaano2g ZCX0eTUlXXDIs3GsUjeJI1vpweQy1W1BHjm0Eow9mitTWvkN+RgCTgIyo6x8+3cxCyNoTI r6kjClaJlZQkoJ4oOT5p4WOSmiAB7UE= X-MC-Unique: xi_82CEYNOaPbqwfRCWCVw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Victor Toso To: libvir-list@redhat.com Subject: [PATCH v4 16/19] scripts: apibuild: parse 'Since' for macros Date: Fri, 22 Apr 2022 21:23:41 +0200 Message-Id: <20220422192344.830350-17-victortoso@redhat.com> In-Reply-To: <20220422192344.830350-1-victortoso@redhat.com> References: <20220422192344.830350-1-victortoso@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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: 1650655515198100003 Content-Type: text/plain; charset="utf-8" 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. 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 24ca98bd1c..b77eea0624 100755 --- a/scripts/apibuild.py +++ b/scripts/apibuild.py @@ -2267,11 +2267,15 @@ class docBuilder: output.write(" string=3D'%s'" % strValue) else: output.write(" raw=3D'%s'" % escape(rawValue)) + + (since, comment) =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