[PATCH v4 13/19] scripts: apibuild: parse 'Since' version for enums

Andrea Bolognani abologna at redhat.com
Tue Apr 26 15:43:39 UTC 2022


On Fri, Apr 22, 2022 at 09:23:38PM +0200, Victor Toso wrote:
> This patch adds 'version' parameter to the generated XML API for
> enums.
>
> It'll require, for new additions, to add a comment with the version
> that the enum value was added.
>
> 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 <victortoso at redhat.com>
> ---
>  scripts/apibuild.py | 30 +++++++++++++++++++++++++++++-
>  1 file changed, 29 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/apibuild.py b/scripts/apibuild.py
> index bdd3077c48..19e897b1ba 100755
> --- a/scripts/apibuild.py
> +++ b/scripts/apibuild.py
> @@ -2178,6 +2178,26 @@ class docBuilder:
>          self.scanModules()
>          self.scanVersions()
>
> +    # Fetch tags from the comment. Only 'Since' supported at the moment.
> +    # Return the tags and the original comment without the tags.
> +    def retrieve_comment_tags(self, name: str, comment: str
> +                              ) -> (str, str):

This is a very peculiar way to format the signature. I'll change it
to the more common

  def retrieve_comment_tags(self, name: str, comment: str) -> (str, str):

before pushing.

Reviewed-by: Andrea Bolognani <abologna at redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization



More information about the libvir-list mailing list