[gtk-doc] scan: Ignore macro definitions with DEPRECATED in their name



commit 0a4665456151c9c76e13824a5e71a86d538e6426
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Jun 27 12:01:42 2014 +0100

    scan: Ignore macro definitions with DEPRECATED in their name
    
    These should not be automatically deprecated.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=731417

 gtkdoc-scan.in |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
index 4c02568..0387afb 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -381,9 +381,11 @@ sub ScanHeader {
 
         # If we find a line containing _DEPRECATED, we hope that this is
         # attribute based deprecation and also treat this as a deprecation
-        # guard.
+        # guard, unless it's a macro definition.
         if ($deprecated_conditional_nest == 0 and m/_DEPRECATED/) {
-            $deprecated_conditional_nest += 0.1;
+            unless (m/^\s*#\s*(if*|define)/) {
+                $deprecated_conditional_nest += 0.1;
+            }
         }
 
         # set global that is used later when we do AddSymbolToList


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