summaryrefslogtreecommitdiff
path: root/giscanner/maintransformer.py
diff options
context:
space:
mode:
authorEvan Nemerson <evan@coeus-group.com>2012-07-10 13:59:23 -0700
committerEvan Nemerson <evan@coeus-group.com>2012-07-10 14:52:25 -0700
commit368d72e61740cb318647296ff39495ad32fbe4d3 (patch)
tree0f3feae12f141aebad406ec077f8a068276124e2 /giscanner/maintransformer.py
parentf77cfc4275b1fba4f9fedea6e40b00e0ebbe142c (diff)
downloadgobject-introspection-368d72e61740cb318647296ff39495ad32fbe4d3.tar.gz
scanner: support stability tag
https://bugzilla.gnome.org/show_bug.cgi?id=679160
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r--giscanner/maintransformer.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 87238755..77a66d21 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -24,7 +24,8 @@ from . import message
from .annotationparser import (TAG_VFUNC, TAG_SINCE, TAG_DEPRECATED, TAG_RETURNS,
TAG_ATTRIBUTES, TAG_RENAME_TO, TAG_TYPE,
TAG_UNREF_FUNC, TAG_REF_FUNC, TAG_SET_VALUE_FUNC,
- TAG_GET_VALUE_FUNC, TAG_VALUE, TAG_TRANSFER)
+ TAG_GET_VALUE_FUNC, TAG_VALUE, TAG_TRANSFER,
+ TAG_STABILITY)
from .annotationparser import (OPT_ALLOW_NONE, OPT_ARRAY, OPT_ATTRIBUTE,
OPT_ELEMENT_TYPE, OPT_IN, OPT_INOUT,
OPT_INOUT_ALT, OPT_OUT, OPT_SCOPE,
@@ -617,6 +618,15 @@ usage is void (*_gtk_reserved1)(void);"""
if version is not None:
node.deprecated_version = version
+ stability_tag = block.get_tag(TAG_STABILITY)
+ if stability_tag is not None:
+ stability = stability_tag.value.capitalize()
+ if stability in ["Stable", "Unstable", "Private", "Internal"]:
+ node.stability = stability
+ else:
+ message.warn('unknown value "%s" for Stability tag' % (
+ stability_tag.value), stability_tag.position)
+
annos_tag = block.get_tag(TAG_ATTRIBUTES)
if annos_tag is not None:
for key, value in annos_tag.options.iteritems():