[gtk-doc] Ignore more decorators on functions



commit 00efc5dd162d29272787707e76900f3fa0436356
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Oct 9 16:17:30 2011 -0400

    Ignore more decorators on functions
    
    gtk-doc was explicitly ignoring only G_GNUC_*, which is good enough
    for G_GNUC_MALLOC, G_GNUC_PRINTF etc. But for deprecation annotations,
    we want to be able to change these on a per-module basis, so we
    need to be able to wrap G_GNUC_DEPRECATED in, say, a GTK_DEPRECATED
    macro. And it would be good if gtk-doc would not stumble over it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=624001

 gtkdoc-scan.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
index 0de762b..04bfb4a 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -724,7 +724,7 @@ sub ScanHeader {
         # Note that sometimes functions end in ') G_GNUC_PRINTF (2, 3);' or
         # ') __attribute__ (...);'.
         if ($in_declaration eq 'function') {
-            if ($decl =~ s/\)\s*(G_GNUC_.*|${IGNORE_DECORATORS}\s*|__attribute__\s*\(.*\)\s*)?;.*$//) {
+            if ($decl =~ s/\)\s*(G_GNUC_.*|.*DEPRECATED.*|${IGNORE_DECORATORS}\s*|__attribute__\s*\(.*\)\s*)?;.*$//) {
                 if ($internal == 0) {
                      $decl =~ s%/\*.*?\*/%%gs;        # remove comments.
                      #$decl =~ s/^\s+//;                # remove leading whitespace.



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