summaryrefslogtreecommitdiff
path: root/giscanner/maintransformer.py
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2013-05-21 10:47:11 +0200
committerDieter Verfaillie <dieterv@optionexplicit.be>2013-10-08 20:56:10 +0200
commit556bb8ee3402b92e2936ed3b594cdfc0b04a9db5 (patch)
tree42c4f67dac6d6775c7e4148e374188bf517effee /giscanner/maintransformer.py
parent07ad34a094cb00aef16250dfbf05d6eef05c3aff (diff)
downloadgobject-introspection-556bb8ee3402b92e2936ed3b594cdfc0b04a9db5.tar.gz
giscanner: fix description field storage in .gir files
GTK-Doc description fields for tags can contain multiple lines and even multiple paragraphs. Whitespace cannot be preserved in XML attributes, so we move the "deprecated" description text into a "<doc-deprecated />" element right next to where we already have the "<doc />" element. Keep the "deprecated" attribute around for backwards compatibility though, but set its value to "1" (analogous to the "writable", "contruct", etc attributes) if the annotated symbol is marked as deprecated. While at it, add <doc-version /> and <doc-stability /> which was not yet available in the .gir files... This takes care of the "Since:", "Stability:" and "Deprecated:" GTK-Doc tags. Nothing needs to be done for the "Returns:" tag as as we already write a "<doc />" child element on "<return-value />".
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r--giscanner/maintransformer.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index ebb2b88e..d356aacb 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -588,18 +588,22 @@ class MainTransformer(object):
if since_tag is not None:
if since_tag.value:
node.version = since_tag.value
+ if since_tag.description:
+ node.version_doc = since_tag.description
deprecated_tag = block.tags.get(TAG_DEPRECATED)
if deprecated_tag is not None:
if deprecated_tag.value:
- node.deprecated_version = deprecated_tag.value
+ node.deprecated = deprecated_tag.value
if deprecated_tag.description:
- node.deprecated = deprecated_tag.description
+ node.deprecated_doc = deprecated_tag.description
stability_tag = block.tags.get(TAG_STABILITY)
if stability_tag is not None:
if stability_tag.value:
node.stability = stability_tag.value
+ if stability_tag.description:
+ node.stability_doc = stability_tag.description
attributes_annotation = block.annotations.get(ANN_ATTRIBUTES)
if attributes_annotation is not None: