[gtk-doc] gtkdoc-scan: function prototypes can have multiple decorators
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] gtkdoc-scan: function prototypes can have multiple decorators
- Date: Tue, 6 Jan 2015 13:55:41 +0000 (UTC)
commit e91d36da262b6451014a9863e35e6131378946b6
Author: Stefan Sauer <ensonic users sf net>
Date: Tue Jan 6 14:46:12 2015 +0100
gtkdoc-scan: function prototypes can have multiple decorators
Instead of allowing none or one, allow any number of decorator matches at the end of prototypes.
Fixes #741941
gtkdoc-scan.in | 2 +-
tests/bugs/docs/tester-sections.txt | 2 ++
tests/bugs/src/tester.c | 10 ++++++++++
tests/bugs/src/tester.h | 5 +++++
4 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
index cc1a284..dcb5e31 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -750,7 +750,7 @@ sub ScanHeader {
# Note that sometimes functions end in ') G_GNUC_PRINTF (2, 3);' or
# ') __attribute__ (...);'.
if ($in_declaration eq 'function') {
- if ($decl =~
s/\)\s*(G_GNUC_.*|.*DEPRECATED.*|${IGNORE_DECORATORS}\s*|__attribute__\s*\(.*\)\s*)?;.*$//) {
+ if ($decl =~
s/\)\s*(G_GNUC_.*|.*DEPRECATED.*|${IGNORE_DECORATORS}\s*|__attribute__\s*\(.*\)\s*)*;.*$//) {
if ($internal == 0) {
$decl =~ s%/\*.*?\*/%%gs; # remove comments.
#$decl =~ s/^\s+//; # remove leading whitespace.
diff --git a/tests/bugs/docs/tester-sections.txt b/tests/bugs/docs/tester-sections.txt
index 45a56b3..6fd71b5 100644
--- a/tests/bugs/docs/tester-sections.txt
+++ b/tests/bugs/docs/tester-sections.txt
@@ -65,6 +65,7 @@ bug_624001d
bug_624001e
bug_711598
deprecation_notice
+bug_741941
gst_play_marshal_BUFFER__BOXED
<SUBSECTION Standard>
<SUBSECTION Private>
@@ -76,5 +77,6 @@ BUG_711598_DEPRECATED_FOR
bug_554833_new
BUG_731417_DEPRECATED
Bug730658
+G_GNUC_NONNULL
</SECTION>
diff --git a/tests/bugs/src/tester.c b/tests/bugs/src/tester.c
index 4a281cf..0f0d1cc 100644
--- a/tests/bugs/src/tester.c
+++ b/tests/bugs/src/tester.c
@@ -426,3 +426,13 @@ void deprecation_notice(void)
{
}
+/**
+ * bug_741941:
+ * @object: the object
+ * @par: parameter
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=741941
+ */
+void bug_741941(void *object, void *par)
+{
+}
diff --git a/tests/bugs/src/tester.h b/tests/bugs/src/tester.h
index f75badf..04c5ae4 100644
--- a/tests/bugs/src/tester.h
+++ b/tests/bugs/src/tester.h
@@ -498,6 +498,11 @@ void bug_711598(void);
void deprecation_notice(void);
#endif
+#ifndef G_GNUC_NONNULL
+#define G_GNUC_NONNULL(a)
+#endif
+void bug_741941(void *object, void *par) G_GNUC_NONNULL(1) G_GNUC_NONNULL(2);
+
/**
* BUG_731417_DEPRECATED:
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]