[gtk-doc/wip/desrt/fixes-for-glib] gtkdoc-scan: fix regex for get_type() functions



commit 9dbfc9cca15482b0b82a40638a5facff1e936c82
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Mar 12 18:50:50 2015 -0400

    gtkdoc-scan: fix regex for get_type() functions
    
    This regexp was apparently looking for "(void)" or "()" but in fact, due
    to improper order of operations, would match any declaration with either
    of "(void" or ")" in it (ie: everything).
    
    Since nobody is really doing '()' anyway, just make it match '(void)'.

 gtkdoc-scan.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
index a45744a..28ab6be 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -786,7 +786,7 @@ sub ScanHeader {
                          print DECL 
"<FUNCTION>\n<NAME>$symbol</NAME>\n$deprecated<RETURNS>$ret_type</RETURNS>\n$decl\n</FUNCTION>\n";
                          if ($REBUILD_TYPES) {
                              # check if this looks like a get_type function and if so remember
-                             if (($symbol =~ m/_get_type$/) && ($ret_type =~ m/GType/) && ($decl =~ 
m/(void|)/)) {
+                             if (($symbol =~ m/_get_type$/) && ($ret_type =~ m/GType/) && ($decl =~ 
m/(void)/)) {
                                  @TRACE@("Adding get-type: [$ret_type] [$symbol] [$decl]\tfrom $input_file");
                                  push (@get_types, $symbol);
                              }


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