Re: [PATCH 1/7] docs: don't write out empty info attributes for function arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/22/2013 07:31 AM, Claudio Bley wrote:
> 
> Signed-off-by: Claudio Bley <cbley@xxxxxxxxxx>
> ---
>  docs/apibuild.py |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/docs/apibuild.py b/docs/apibuild.py
> index 9a29c42..f9500b1 100755
> --- a/docs/apibuild.py
> +++ b/docs/apibuild.py
> @@ -2183,8 +2183,8 @@ class docBuilder:
>              output.write("      <info><![CDATA[%s]]></info>\n" % (desc))
>              self.indexString(name, desc)
>              if ret[0] != None:
> -                if ret[0] == "void":
> -                    output.write("      <return type='void'/>\n")
> +                if ret[0] == "void" or ret[1] == None or ret[1] == '':
> +                    output.write("      <return type='%s'/>\n" % ret[0])

Can we instead make it a fatal error if ret[1] == None or ret[1] == '',
to force 'make' to fail and point out the missing documentation?

>                  else:
>                      output.write("      <return type='%s' info='%s'/>\n" % (
>                               ret[0], escape(ret[1])))
> @@ -2192,8 +2192,8 @@ class docBuilder:
>              for param in params:
>                  if param[0] == 'void':
>                      continue
> -                if param[2] == None:
> -                    output.write("      <arg name='%s' type='%s' info=''/>\n" % (param[1], param[0]))
> +                if param[2] == None or param[2] == '':
> +                    output.write("      <arg name='%s' type='%s' />\n" % (param[1], param[0]))
>                  else:
>                      output.write("      <arg name='%s' type='%s' info='%s'/>\n" % (param[1], param[0], escape(param[2])))
>                      self.indexString(name, param[2])
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]