[gtk-doc] Fix the hack in the previous commit



commit 317a35cc18f46d12715855dfb0539d873759a956
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jan 23 21:04:52 2014 -0500

    Fix the hack in the previous commit
    
    With 0.1 bump whenever we see _DEPRECATED, we can now enter
    the nesting calculation with a counter value that is between
    0 and 1. Therefore, change the checks to look for >=1 instead
    of >0. This fixes parsing of an #ifdef in gtkstock.h.

 gtkdoc-scan.in |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
index 6493199..0128ccd 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -344,9 +344,9 @@ sub ScanHeader {
         # zone, take note.
         if (m/^\s*#\s*if(?:n?def\b|\s+!?\s*defined\s*\()\s*(\w+)/) {
             my $define_name = $1;
-            if ($deprecated_conditional_nest == 0 and $define_name =~ /$DEPRECATED_GUARDS/) {
+            if ($deprecated_conditional_nest < 1 and $define_name =~ /$DEPRECATED_GUARDS/) {
                  $deprecated_conditional_nest = 1;
-            } elsif ($deprecated_conditional_nest > 0) {
+            } elsif ($deprecated_conditional_nest >= 1) {
                  $deprecated_conditional_nest += 1;
             }
             if ($ignore_conditional_nest == 0 and $define_name =~ /__GTK_DOC_IGNORE__/) {
@@ -355,14 +355,14 @@ sub ScanHeader {
                  $ignore_conditional_nest += 1;
             }
         } elsif (m/^\s*#\sif/) {
-            if ($deprecated_conditional_nest > 0) {
+            if ($deprecated_conditional_nest >= 1) {
                  $deprecated_conditional_nest += 1;
             }
             if ($ignore_conditional_nest > 0) {
                  $ignore_conditional_nest += 1;
             }
         } elsif (m/^\s*#endif/) {
-            if ($deprecated_conditional_nest > 0) {
+            if ($deprecated_conditional_nest >= 1) {
                 $deprecated_conditional_nest -= 1;
             }
             if ($ignore_conditional_nest > 0) {


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