[gtk-doc] scan: fix a regression when scanning over inline functions



commit 25e534463a259420d07309535f8b99e468cfaec2
Author: Stefan Sauer <ensonic users sf net>
Date:   Sat Jul 13 22:17:34 2019 -0700

    scan: fix a regression when scanning over inline functions
    
    Fixes #90.

 gtkdoc/scan.py | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/gtkdoc/scan.py b/gtkdoc/scan.py
index cff9ec4..f6d62fb 100644
--- a/gtkdoc/scan.py
+++ b/gtkdoc/scan.py
@@ -794,6 +794,10 @@ def ScanHeaderContent(input_lines, decl_list, get_types, options):
                         decl += ';'
                         skip_block = 0
                         logging.info('2: ---')
+                    # we found the last '}' of an internal decl, go back
+                    # scanning for symbols
+                    if skip_block == 0 and internal:
+                        in_declaration = ''
 
                 else:
                     if skip_block == 1:
@@ -914,6 +918,11 @@ def ScanHeaderContent(input_lines, decl_list, get_types, options):
         pre_previous_line = previous_line
         previous_line = line
 
+    # here we want in_declaration=='', otherwise we have a partial symbol
+    # TODO: this breaks two tests, fix that first and then enable
+    #if in_declaration != '':
+    #    raise RuntimeError('partial declaration (%s) : %s ' % (in_declaration, decl))
+
     # print remaining forward declarations
     for symbol in sorted(forward_decls.keys()):
         if forward_decls[symbol]:


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