summaryrefslogtreecommitdiff
path: root/gtkdoc-scan.in
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2010-07-13 16:44:18 +0300
committerStefan Kost <ensonic@users.sf.net>2010-07-13 16:44:18 +0300
commit9569daae7fbf4f542050034191cc0798dc53dda5 (patch)
tree4699c8d71a471c6382fca5dd2ee062baeeace01a /gtkdoc-scan.in
parent5fdb82a4b7e71a4801bffc62fc3cb2937b7c7e79 (diff)
downloadgtk-doc-9569daae7fbf4f542050034191cc0798dc53dda5.tar.gz
scan: allow static inline functions in headers. Fixes #481811
Also fix the test case - G_INLINE_FUNC != static inline
Diffstat (limited to 'gtkdoc-scan.in')
-rwxr-xr-xgtkdoc-scan.in17
1 files changed, 14 insertions, 3 deletions
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
index 87df993..58d48ab 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -560,6 +560,17 @@ sub ScanHeader {
#print "DEBUG: Function (2): $symbol, Returns: $ret_type\n";
$in_declaration = "function";
}
+ } else {
+ #print "DEBUG: skip block after inline function\n";
+ # now we we need to skip a whole { } block
+ $skip_block = 1;
+ # $1 $2
+ if ($previous_line =~ m/^\s*(?:\b(?:extern|static|inline|${IGNORE_DECORATORS})\b\s*)*((?:const\s+|G_CONST_RETURN\s+|signed\s+|unsigned\s+|long\s+|short\s+|struct\s+|union\s+|enum\s+)*\w+)((?:\s*(?:\*+|\bconst\b|\bG_CONST_RETURN\b))*)\s*$/o) {
+ $ret_type = $1;
+ if (defined ($2)) { $ret_type .= " $2"; }
+ #print "DEBUG: Function (3): $symbol, Returns: $ret_type\n";
+ $in_declaration = "function";
+ }
}
}
else {
@@ -571,7 +582,7 @@ sub ScanHeader {
if ($previous_line =~ m/^\s*(?:\b(?:extern|G_INLINE_FUNC|${IGNORE_DECORATORS})\b\s*)*((?:const\s+|G_CONST_RETURN\s+|signed\s+|unsigned\s+|long\s+|short\s+|struct\s+|union\s+|enum\s+)*\w+)((?:\s*(?:\*+|\bconst\b|\bG_CONST_RETURN\b))*)\s*$/o) {
$ret_type = $1;
if (defined ($2)) { $ret_type .= " $2"; }
- #print "DEBUG: Function (3): $symbol, Returns: $ret_type\n";
+ #print "DEBUG: Function (4): $symbol, Returns: $ret_type\n";
$in_declaration = "function";
}
}
@@ -584,7 +595,7 @@ sub ScanHeader {
if ($previous_line =~ m/^\s*(?:\b(?:extern|G_INLINE_FUNC|${IGNORE_DECORATORS})\b\s*)*((?:const\s+|G_CONST_RETURN\s+|signed\s+|unsigned\s+|enum\s+)*\w+)(\s+\*+|\*+|\s)\s*([A-Za-z]\w*)\s*$/o) {
$ret_type = "$1 $2";
$symbol = $3;
- #print "DEBUG: Function (4): $symbol, Returns: $ret_type\n";
+ #print "DEBUG: Function (5): $symbol, Returns: $ret_type\n";
$in_declaration = "function";
} elsif ($previous_line =~ m/^\s*\w+\s*$/
@@ -596,7 +607,7 @@ sub ScanHeader {
$symbol = $previous_line;
$symbol =~ s/^\s+//;
$symbol =~ s/\s*\n//;
- #print "DEBUG: Function (5): $symbol, Returns: $ret_type\n";
+ #print "DEBUG: Function (6): $symbol, Returns: $ret_type\n";
}
#} elsif (m/^extern\s+/) {