From nobody Tue Feb 10 09:24:21 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=1649969526; cv=none; d=zohomail.com; s=zohoarc; b=mOz5hMr2cUNXpUoErRKK4GnanA8pT3fNaXDsdqHx6pEyRJbHfn1lpLLVJs8hhUEko9pXtyEsUyoKz3ZCEZ3yESJj34ACaR1i5xTKHxK2uTGD/GSRMiGYr5TYvZDW9ADb2ejzwHAZP4orR/iPwNiqnihbqSga85O4SJLhsMFgHmM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649969526; 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=LfZsRF7/WmpfYz9jpOdkavxhnVFomMrnxdfIeVjnGn0=; b=Bm3EdHKIgQ+xVFPRXhcEg9Z/UVrqltzlBTWl4LEyRcwvwZKYFQZ4HEljVTsFKu3/C3oWcWdEvVDPUchYozHS4gjmBmZFo7bimVI8SFJNhRlCBbtTnwlklqOcjW//Sa0qeh3kQAg3O191bV4jThujhOXhMHn53XScuxkjOvjI2y8= 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 16499695265221009.9086760183442; Thu, 14 Apr 2022 13:52:06 -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-664-K89x5PTCPCuHoVW_rQMSKg-1; Thu, 14 Apr 2022 16:51:18 -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 E85973816F83; 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 C3EB9C44CCD; 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 89D74194037E; 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 DFC3E1940353 for ; Thu, 14 Apr 2022 20:50:46 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CE8A52167D6B; Thu, 14 Apr 2022 20:50:46 +0000 (UTC) Received: from tapioca.home (unknown [10.40.193.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4358D2167D68 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=1649969525; 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=LfZsRF7/WmpfYz9jpOdkavxhnVFomMrnxdfIeVjnGn0=; b=I5gW8ecg9Vd9rHepco3DxQX3RNxaDq9DrpAZ+UBlXv4pTO8QcUhh6HRmpWillPjLGaG+Ho lE/XluY+V4urT3uLRWiLKJGQ0DSTEwfSf97c/fwUwc5ply/QASwf8P1YowxBD7nFBjAOsa IagY2SV1Rp6S4haK7dJO3O/sH0bywrE= X-MC-Unique: K89x5PTCPCuHoVW_rQMSKg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Victor Toso To: libvir-list@redhat.com Subject: [PATCH v2 28/34] scripts: apibuild: parse 'Since' for macros Date: Thu, 14 Apr 2022 22:47:39 +0200 Message-Id: <20220414204745.108966-29-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.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: 1649969527458100003 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. 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 da70d67fa6..c4ff733550 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)) + + (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