From 9768ce5d65640ecf4ea04004503053977880f340 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 28 Apr 2010 23:44:32 +0300 Subject: [PATCH] Revert "scope: make protected fields visible in the docs" This reverts commit 8708b09401327af314d4f4af5656ef4ae6222ef7. --- 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 9dad3ca..f7acca6 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|protected)\s*>\s*\*/|(?=\}))!$1!msgx; + (?:/\*\s*<\s*public\s*>\s*\*/|(?=\}))!$1!msgx; } # Remove private symbols # Assume end of declaration if line begins with '}' - $declaration =~ s!\n?[ \t]*/\*\s*<\s*private\s*>\s*\*/.*?(?:/\*\s*<\s*(public|protected)\s*>\s*\*/|(?=^\}))!!msgx; + $declaration =~ s!\n?[ \t]*/\*\s*<\s*(private|protected)\s*>\s*\*/.*?(?:/\*\s*<\s*public\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\s*>\s*\*/.*?(?:/\*\s*<\s*(public|protected)\s*>\s*\*/|(?=^\}))!!msgx; + $declaration =~ s!\n?[ \t]*/\*\s*<\s*(private|protected)\s*>\s*\*/.*?(?:/\*\s*<\s*public\s*>\s*\*/|(?=^\}))!!msgx; # Remove comments $declaration =~ s@/\*([^*]+|\*(?!/))*\*/@ @g; diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in index 1907526..7827f0d 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|protected)\s*>\s*\*/%) { + if ($decl_line =~ m%/\*\s*<\s*public\s*>\s*\*/%) { $public = 1; - } elsif ($decl_line =~ m%/\*\s*<\s*private\s*>\s*\*/%) { + } elsif ($decl_line =~ m%/\*\s*<\s*(private|protected)\s*>\s*\*/%) { $public = 0; } elsif ($public) { $new_declaration .= $decl_line . "\n"; -- 2.11.4.GIT