[gobject-introspection] giscanner: Include field documentation
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] giscanner: Include field documentation
- Date: Mon, 28 Oct 2013 19:58:44 +0000 (UTC)
commit 95cd591fb7e855d280505168444894e729bb39f8
Author: Stef Walter <stefw gnome org>
Date: Sun Oct 20 20:49:22 2013 +0200
giscanner: Include field documentation
Structure field documentation was not being included in the gir file.
https://bugzilla.gnome.org/show_bug.cgi?id=710562
giscanner/maintransformer.py | 2 +-
tests/scanner/Regress-1.0-expected.gir | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 0878313..67cbec8 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -743,7 +743,7 @@ class MainTransformer(object):
type_annotation = tag.annotations.get(ANN_TYPE)
if type_annotation:
field.type = self._transformer.create_type_from_user_string(type_annotation[0])
-
+ field.doc = tag.description
try:
self._adjust_container_type(parent, field, tag.annotations)
except AttributeError, ex:
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index 925fe53..a16205b 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -90,14 +90,17 @@ and/or use gtk-doc annotations. -->
<record name="AnnotationFields" c:type="RegressAnnotationFields">
<doc xml:space="preserve">This is a struct for testing field documentation and annotations</doc>
<field name="field1" writable="1">
+ <doc xml:space="preserve">Some documentation</doc>
<type name="gint" c:type="int"/>
</field>
<field name="arr" writable="1">
+ <doc xml:space="preserve">an array of length @len</doc>
<array length="2" zero-terminated="0" c:type="guchar*">
<type name="guint8" c:type="guchar"/>
</array>
</field>
<field name="len" writable="1">
+ <doc xml:space="preserve">the length of array</doc>
<type name="gulong" c:type="gulong"/>
</field>
</record>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]