[gtk-doc] Don't show raw typedef for enums



commit 905031cccb0e755ac209c66d1f3d51015be950ac
Author: William Jon McCann <william jon mccann gmail com>
Date:   Wed Feb 12 18:31:14 2014 -0500

    Don't show raw typedef for enums
    
    We have all the information we need in the docs already.
    Showing them in raw form leaks implementation details
    such as aliases and random comments.

 gtkdoc-mkdb.in |   40 ----------------------------------------
 1 files changed, 0 insertions(+), 40 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 9f996cb..2c9d526 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -1972,46 +1972,6 @@ sub OutputEnum {
     $desc .= MakeIndexterms($symbol, $id);
     $desc .= "\n";
     $desc .= OutputSymbolExtraLinks($symbol);
-
-    my $decl_out = "";
-    my $public = 1;
-    my $new_declaration = "";
-    my $decl_line;
-    my $decl = $declaration;
-
-    if ($decl =~ m/^\s*(typedef\s+)?enum\s*\w*\s*(?:\/\*.*\*\/)?\s*{(.*)}\s*\w*\s*;\s*$/s) {
-        my $has_typedef = defined($1) ? 1 : 0;
-        my $enum_contents = $2;
-
-        foreach $decl_line (split (/\n/, $enum_contents)) {
-            #print "Enum line: $decl_line\n";
-            if ($decl_line =~ m%/\*\s*<\s*public\s*>\s*\*/%) {
-                $public = 1;
-            } elsif ($decl_line =~ m%/\*\s*<\s*(private|protected)\s*>\s*\*/%) {
-                $public = 0;
-            } elsif ($public) {
-                $new_declaration .= $decl_line . "\n";
-            }
-        }
-
-        if ($new_declaration) {
-            # Strip any blank lines off the ends.
-            $new_declaration =~ s/^\s*\n//;
-            $new_declaration =~ s/\n\s*$/\n/;
-
-            if ($has_typedef) {
-                $decl_out = "typedef enum {\n" . $new_declaration
-                  . "} $symbol;\n";
-            } else {
-                $decl_out = "enum $symbol {\n" . $new_declaration
-                  . "};\n";
-            }
-        }
-    }
-
-    $decl_out = &CreateValidSGML ($decl_out);
-    $desc .= "<programlisting language=\"C\">$decl_out</programlisting>\n";
-
     $desc .= &MakeDeprecationNote($symbol);
 
     if (defined ($SymbolDocs{$symbol})) {


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