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

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



Signed-off-by: Claudio Bley <cbley av-test de>
---
 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])
                 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])
-- 
1.7.9.5


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