[gtk-doc] gtkdoc-scan.in: allow ordinary structs and enums to be documented
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] gtkdoc-scan.in: allow ordinary structs and enums to be documented
- Date: Tue, 22 Apr 2014 12:19:20 +0000 (UTC)
commit 598f6d7378da895fd933d0edebd1cefbaf1e313d
Author: Thomas Wood <thomas wood intel com>
Date: Fri Mar 28 16:53:15 2014 +0000
gtkdoc-scan.in: allow ordinary structs and enums to be documented
https://bugzilla.gnome.org/show_bug.cgi?id=657444
gtkdoc-scan.in | 6 +++---
tests/bugs/docs/tester-sections.txt | 1 +
tests/bugs/src/tester.h | 6 ++++++
tests/gobject/docs/tester-sections.txt | 2 ++
tests/gobject/src/gobject.h | 13 +++++++++++++
5 files changed, 25 insertions(+), 3 deletions(-)
---
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
index dd9084d..4c02568 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -484,7 +484,7 @@ sub ScanHeader {
# ENUMS
- } elsif (s/^\s*enum\s+_(\w+)\s+\{/enum $1 {/) {
+ } elsif (s/^\s*enum\s+_?(\w+)\s+\{/enum $1 {/) {
# We assume that 'enum _<enum_name> {' is really the
# declaration of enum <enum_name>.
$symbol = $1;
@@ -682,11 +682,11 @@ sub ScanHeader {
# STRUCTS
- } elsif (m/^\s*struct\s+_(\w+)\s*\*/) {
+ } elsif (m/^\s*struct\s+_?(\w+)\s*\*/) {
# Skip 'struct _<struct_name> *', since it could be a
# return type on its own line.
- } elsif (m/^\s*struct\s+_(\w+)/) {
+ } elsif (m/^\s*struct\s+_?(\w+)/) {
# We assume that 'struct _<struct_name>' is really the
# declaration of struct <struct_name>.
$symbol = $1;
diff --git a/tests/bugs/docs/tester-sections.txt b/tests/bugs/docs/tester-sections.txt
index a7df5c3..889fee5 100644
--- a/tests/bugs/docs/tester-sections.txt
+++ b/tests/bugs/docs/tester-sections.txt
@@ -11,6 +11,7 @@ Bug512154
Bug642998
Bug644291
Bug000000Scope
+bug_411739_rettype
<SUBSECTION Functions>
bug_000000_va1
BUG_000000_VA2
diff --git a/tests/bugs/src/tester.h b/tests/bugs/src/tester.h
index cc1f6a3..3a67872 100644
--- a/tests/bugs/src/tester.h
+++ b/tests/bugs/src/tester.h
@@ -91,6 +91,12 @@ void bug_379466 (int
int bug_380824 (int arg);
+/**
+ * bug_411739_rettype:
+ * @test: field
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=411739
+ */
struct bug_411739_rettype {
int test;
};
diff --git a/tests/gobject/docs/tester-sections.txt b/tests/gobject/docs/tester-sections.txt
index 881bf96..b1d5942 100644
--- a/tests/gobject/docs/tester-sections.txt
+++ b/tests/gobject/docs/tester-sections.txt
@@ -66,6 +66,8 @@ GtkdocEnum
GtkdocEnum2
GtkdocPlainOldData
GtkdocBoxedPlainOldData
+GtkdocHelperEnum
+GtkdocHelperStruct
<SUBSECTION Standard>
GTKDOC_TYPE_ENUM
GTKDOC_TYPE_ENUM2
diff --git a/tests/gobject/src/gobject.h b/tests/gobject/src/gobject.h
index 35cfbc2..03f4262 100644
--- a/tests/gobject/src/gobject.h
+++ b/tests/gobject/src/gobject.h
@@ -95,10 +95,23 @@ struct _GtkdocObject3Class {
};
+/**
+ * GtkdocHelperStruct:
+ * @a: field
+ *
+ * GtkdocHelperStruct
+ */
struct GtkdocHelperStruct {
int a;
};
+/**
+ * GtkdocHelperEnum:
+ * @GTKDOC_HELPER_ENUM_A: enum a
+ * @GTKDOC_HELPER_ENUM_B: enum b
+ *
+ * GtkdocHelperEnum
+ */
enum GtkdocHelperEnum {
GTKDOC_HELPER_ENUM_A,
GTKDOC_HELPER_ENUM_B
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]