[gtk-doc] scan: improve parsing of externs
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] scan: improve parsing of externs
- Date: Thu, 18 Aug 2011 11:58:01 +0000 (UTC)
commit a0ac307ccd90c1afa890d7d4583f73dae30d23ad
Author: Stefan Kost <ensonic users sf net>
Date: Thu Aug 18 13:56:41 2011 +0200
scan: improve parsing of externs
An extern of the form "extern const type const name" was not recognised. Add a
test for this as well. Fixes #656773
gtkdoc-scan.in | 6 +++---
tests/bugs/docs/tester-sections.txt | 1 +
tests/bugs/src/tester.h | 8 ++++++++
3 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
index 749038f..f05dd9b 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -530,10 +530,10 @@ sub ScanHeader {
# VARIABLES (extern'ed variables)
- } elsif (m/^\s*(extern|[A-Za-z_]+VAR)\s+((const\s+|signed\s+|unsigned\s+)*\w+)(\s+\*+|\*+|\s)\s*([A-Za-z]\w*)\s*;/) {
- $symbol = $5;
+ } elsif (m/^\s*(extern|[A-Za-z_]+VAR)\s+((const\s+|signed\s+|unsigned\s+)*\w+)(\s+\*+|\*+|\s)\s*(const\s+)*([A-Za-z]\w*)\s*;/) {
+ $symbol = $6;
s/^\s*([A-Za-z_]+VAR)\b/extern/;
- @TRACE@("Possible extern: $_");
+ @TRACE@("Possible extern $6: $_");
if (&AddSymbolToList (\$list, $symbol)) {
print DECL "<VARIABLE>\n<NAME>$symbol</NAME>\n$deprecated$_</VARIABLE>\n";
}
diff --git a/tests/bugs/docs/tester-sections.txt b/tests/bugs/docs/tester-sections.txt
index 90c1079..fc4335d 100644
--- a/tests/bugs/docs/tester-sections.txt
+++ b/tests/bugs/docs/tester-sections.txt
@@ -53,6 +53,7 @@ bug_623968c
bug_624200a
bug_624200b
bug_638330
+BUG_656773
gst_play_marshal_BUFFER__BOXED
<SUBSECTION Standard>
diff --git a/tests/bugs/src/tester.h b/tests/bugs/src/tester.h
index 5e6093c..ad68d01 100644
--- a/tests/bugs/src/tester.h
+++ b/tests/bugs/src/tester.h
@@ -431,4 +431,12 @@ gst_play_marshal_BUFFER__BOXED (gint * closure,
gint * return_value G_GNUC_UNUSED,
gpointer marshal_data);
+
+/**
+ * BUG_656773:
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=656773
+ */
+extern const char* const BUG_656773;
+
#endif // GTKDOC_TESTER_H
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]