summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--giscanner/maintransformer.py2
-rw-r--r--tests/scanner/Regress-1.0-expected.gir3
2 files changed, 4 insertions, 1 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 08783131..67cbec83 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 925fe538..a16205bc 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>