[gtk-doc] gtkdoc-scan: don't add the title until all declarations have been added



commit 8e28e9bc8d1d897573e92134987a9cc96cd0f905
Author: Alexander Kanavin <alexander kanavin intel com>
Date:   Wed Aug 7 21:16:21 2013 +0300

    gtkdoc-scan: don't add the title until all declarations have been added
    
    Previously, adding "SomeSymbol" using AddSymbolToList() didn't work
    if <TITLE>SomeSymbol</TITLE> was already there, due to regexp in
    AddSymbolToList. I fixed the order, rather than the regexp.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705633

 gtkdoc-scan.in |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
index 3b14eba..4a3526b 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -253,6 +253,7 @@ sub ScanHeader {
     my ($input_file, $section_list) = @_;
 
     my $list = "";                  # Holds the resulting list of declarations.
+    my $title = "";                 # Holds the title of the section    
     my ($in_comment) = 0;                  # True if we are in a comment.
     my ($in_declaration) = "";          # The type of declaration we are in, e.g.
                                   #   'function' or 'macro'.
@@ -800,7 +801,7 @@ sub ScanHeader {
                 if ($symbol =~ m/^(\S+)(Class|Iface|Interface)\b/) {
                     my $objectname = $1;
                     @TRACE@("Found object: $1");
-                    $list = "<TITLE>$objectname</TITLE>\n$list";
+                    $title = "<TITLE>$objectname</TITLE>\n";
                     push (@objects, $objectname);
                 }
                 @TRACE@("Store struct: $symbol");
@@ -834,6 +835,9 @@ sub ScanHeader {
         }
     }
 
+    # add title
+    $list = "$title$list";
+    
     @TRACE@("Scanning $input_file done\n");
     
     # Try to separate the standard macros and functions, placing them at the


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