[gtk-doc] common: allow G_GNUC_ attributes on function parameters
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] common: allow G_GNUC_ attributes on function parameters
- Date: Fri, 20 May 2011 13:43:02 +0000 (UTC)
commit ca815451cdfac50b84a7ceef0a50f06088b96cc6
Author: Stefan Kost <ensonic users sf net>
Date: Fri May 20 16:40:57 2011 +0300
common: allow G_GNUC_ attributes on function parameters
Improve parsing and add test.
gtkdoc-common.pl.in | 2 +-
tests/bugs/docs/tester-sections.txt | 2 ++
tests/bugs/src/tester.h | 13 +++++++++++++
3 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/gtkdoc-common.pl.in b/gtkdoc-common.pl.in
index 5f59c69..af43e07 100644
--- a/gtkdoc-common.pl.in
+++ b/gtkdoc-common.pl.in
@@ -365,7 +365,7 @@ sub ParseFunctionDeclaration {
# allow alphanumerics, '_', '[' & ']' in param names
# Try to match a standard parameter
# $1 $2 $3 $4 $5
- } elsif ($declaration =~ s/^\s*((?:(?:G_CONST_RETURN|G_GNUC_[A-Z_]+\s+|unsigned long|unsigned short|signed long|signed short|unsigned|signed|long|short|volatile|const)\s+)*)((?:struct\b|enum\b)?\s*\w+)\s*((?:(?:const\b|restrict\b|G_GNUC_[A-Z_]+\b)?\s*\*?\s*(?:const\b|restrict\b|G_GNUC_[A-Z_]+\b)?\s*)*)(\w+)?\s*((?:\[\S*\])*)\s*[,\n]//) {
+ } elsif ($declaration =~ s/^\s*((?:(?:G_CONST_RETURN|G_GNUC_[A-Z_]+\s+|unsigned long|unsigned short|signed long|signed short|unsigned|signed|long|short|volatile|const)\s+)*)((?:struct\b|enum\b)?\s*\w+)\s*((?:(?:const\b|restrict\b|G_GNUC_[A-Z_]+\b)?\s*\*?\s*(?:const\b|restrict\b|G_GNUC_[A-Z_]+\b)?\s*)*)(\w+)?\s*((?:\[\S*\])*)\s*(?:G_GNUC_[A-Z_]+)?\s*[,\n]//) {
my $pre = defined($1) ? $1 : "";
my $type = $2;
my $ptr = defined($3) ? $3 : "";
diff --git a/tests/bugs/docs/tester-sections.txt b/tests/bugs/docs/tester-sections.txt
index 3cc3d00..90c1079 100644
--- a/tests/bugs/docs/tester-sections.txt
+++ b/tests/bugs/docs/tester-sections.txt
@@ -53,6 +53,8 @@ bug_623968c
bug_624200a
bug_624200b
bug_638330
+
+gst_play_marshal_BUFFER__BOXED
<SUBSECTION Standard>
<SUBSECTION Private>
GTKDOC_GNUC_CONST
diff --git a/tests/bugs/src/tester.h b/tests/bugs/src/tester.h
index 8f644ca..5e6093c 100644
--- a/tests/bugs/src/tester.h
+++ b/tests/bugs/src/tester.h
@@ -418,4 +418,17 @@ struct _Bug000000Scope {
int b;
};
+/**
+ * gst_play_marshal_BUFFER__BOXED:
+ * @closure: test
+ * @return_value: test
+ * @marshal_data: test
+ *
+ * test.
+ */
+void
+gst_play_marshal_BUFFER__BOXED (gint * closure,
+ gint * return_value G_GNUC_UNUSED,
+ gpointer marshal_data);
+
#endif // GTKDOC_TESTER_H
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]