[gtk-doc] scan: don't output empty sections



commit 6f949125d67ce8dd4f71bafb544b8dd304cdbe14
Author: Stefan Kost <ensonic users sf net>
Date:   Sat Dec 26 22:24:06 2009 +0200

    scan: don't output empty sections

 gtkdoc-scan.in |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
index 849e80d..9f953e1 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -731,9 +731,13 @@ sub ScanHeader {
 	    $list .= "<SUBSECTION Standard>\n$standard_decl";
 	}
 
-	$$object_list .= "<SECTION>\n<FILE>$file_basename</FILE>\n$list</SECTION>\n\n";
+	if ($list ne "") {
+	    $$object_list .= "<SECTION>\n<FILE>$file_basename</FILE>\n$list</SECTION>\n\n";
+	}
     } else {
-	$$main_list .= "<SECTION>\n<FILE>$file_basename</FILE>\n$list</SECTION>\n\n";
+        if ($list ne "") {
+            $$main_list .= "<SECTION>\n<FILE>$file_basename</FILE>\n$list</SECTION>\n\n";
+        }
     }
 }
 



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