[gtk-doc] common: when parsing enums, only supress () pairs on one line
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] common: when parsing enums, only supress () pairs on one line
- Date: Tue, 29 Mar 2011 10:14:49 +0000 (UTC)
commit 22f5b79167c8eeb048b4b18a4b4a4b7f935d2c28
Author: Stefan Kost <ensonic users sf net>
Date: Tue Mar 29 13:14:00 2011 +0300
common: when parsing enums, only supress () pairs on one line
Previously this was matching a "(.*)" sequence across lines and thus could
hide enums that contain brackets as character constant.
Fixes: #644291
gtkdoc-common.pl.in | 2 +-
tests/bugs/docs/tester-sections.txt | 1 +
tests/bugs/src/tester.h | 22 ++++++++++++++++++++++
3 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/gtkdoc-common.pl.in b/gtkdoc-common.pl.in
index 41385bb..6ce30b4 100644
--- a/gtkdoc-common.pl.in
+++ b/gtkdoc-common.pl.in
@@ -271,7 +271,7 @@ sub ParseEnumDeclaration {
# to avoid getting confused by commas they might contain. This
# doesn't handle nested parentheses correctly.
- $declaration =~ s/\([^)]+\)//g;
+ $declaration =~ s/\([^)\n]+\)//g;
# Remove comma from comma - possible whitespace - closing brace sequence
# since it is legal in GNU C and C99 to have a trailing comma but doesn't
diff --git a/tests/bugs/docs/tester-sections.txt b/tests/bugs/docs/tester-sections.txt
index 2733769..0b3431a 100644
--- a/tests/bugs/docs/tester-sections.txt
+++ b/tests/bugs/docs/tester-sections.txt
@@ -6,6 +6,7 @@ Bug165425b
Bug324535
Bug446648
Bug512154
+Bug644291
BUG_530758
diff --git a/tests/bugs/src/tester.h b/tests/bugs/src/tester.h
index a61b051..e0df1d8 100644
--- a/tests/bugs/src/tester.h
+++ b/tests/bugs/src/tester.h
@@ -338,5 +338,27 @@ void (*bug_638330) (void *arg1,
const unsigned char *data,
unsigned int length);
+/**
+ * Bug644291:
+ * @BUG_644291_START: foo
+ * @BUG_644291_TEXT: bar
+ * @BUG_644291_END: milk
+ * @BUG_644291_ATTRIBUTE: comes
+ * @BUG_644291_XMLNS: from
+ * @BUG_644291_ASSIGN_TO: cows
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=644291
+ */
+typedef enum
+{
+ BUG_644291_START = '(',
+ BUG_644291_TEXT = '$',
+ BUG_644291_END = ')',
+ BUG_644291_ATTRIBUTE = '@',
+ BUG_644291_XMLNS = ':',
+ BUG_644291_ASSIGN_TO = '*'
+} Bug644291;
+
+
#endif // GTKDOC_TESTER_H
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]