[gtk-doc] scope: make protected fields visible in the docs



commit 8708b09401327af314d4f4af5656ef4ae6222ef7
Author: Stefan Kost <ensonic users sf net>
Date:   Fri Apr 16 11:44:46 2010 +0300

    scope: make protected fields visible in the docs

 gtkdoc-common.pl.in |    6 +++---
 gtkdoc-mkdb.in      |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gtkdoc-common.pl.in b/gtkdoc-common.pl.in
index ed4cde9..aa4ceca 100644
--- a/gtkdoc-common.pl.in
+++ b/gtkdoc-common.pl.in
@@ -107,12 +107,12 @@ sub ParseStructDeclaration {
     if ($is_object) {
 	$declaration =~ s!((?:struct|union)\s+\w*\s*\{)
 	                  .*?
-			  (?:/\*\s*<\s*public\s*>\s*\*/|(?=\}))!$1!msgx;
+			  (?:/\*\s*<\s*(public|protected)\s*>\s*\*/|(?=\}))!$1!msgx;
     }
 
     # Remove private symbols
     # Assume end of declaration if line begins with '}'
-    $declaration =~ s!\n?[ \t]*/\*\s*<\s*(private|protected)\s*>\s*\*/.*?(?:/\*\s*<\s*public\s*>\s*\*/|(?=^\}))!!msgx;
+    $declaration =~ s!\n?[ \t]*/\*\s*<\s*private\s*>\s*\*/.*?(?:/\*\s*<\s*(public|protected)\s*>\s*\*/|(?=^\}))!!msgx;
 
     # Remove all other comments;
     $declaration =~ s@/\*([^*]+|\*(?!/))*\*/@ @g;
@@ -255,7 +255,7 @@ sub ParseEnumDeclaration {
     
     # Remove private symbols
     # Assume end of declaration if line begins with '}'
-    $declaration =~ s!\n?[ \t]*/\*\s*<\s*(private|protected)\s*>\s*\*/.*?(?:/\*\s*<\s*public\s*>\s*\*/|(?=^\}))!!msgx;
+    $declaration =~ s!\n?[ \t]*/\*\s*<\s*private\s*>\s*\*/.*?(?:/\*\s*<\s*(public|protected)\s*>\s*\*/|(?=^\}))!!msgx;
 
     # Remove comments
     $declaration =~ s@/\*([^*]+|\*(?!/))*\*/@ @g;
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 7e0a6a6..3776594 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -1481,9 +1481,9 @@ sub OutputStruct {
 
 	    foreach $decl_line (split (/\n/, $struct_contents)) {
 	        #print "Struct line: $decl_line\n";
-	        if ($decl_line =~ m%/\*\s*<\s*public\s*>\s*\*/%) {
+	        if ($decl_line =~ m%/\*\s*<\s*(public|protected)\s*>\s*\*/%) {
 		    $public = 1;
-		} elsif ($decl_line =~ m%/\*\s*<\s*(private|protected)\s*>\s*\*/%) {
+		} elsif ($decl_line =~ m%/\*\s*<\s*private\s*>\s*\*/%) {
 		    $public = 0;
 		} elsif ($public) {
 		    $new_declaration .= $decl_line . "\n";



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