summaryrefslogtreecommitdiff
path: root/giscanner/maintransformer.py
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2015-09-28 11:17:07 -0400
committerColin Walters <walters@verbum.org>2015-09-28 11:17:29 -0400
commitd1086a641d6e46140b13996ff5a3bfbb90662dd5 (patch)
tree23a6ccf19108b5964cde6dbbf35892613afc7e3d /giscanner/maintransformer.py
parentea73b39cfc230e5cb8e5c56ffc83988c573a9513 (diff)
downloadgobject-introspection-d1086a641d6e46140b13996ff5a3bfbb90662dd5.tar.gz
scanner: GVariants are also valid to be floating
More followup to https://bugzilla.gnome.org/show_bug.cgi?id=752047
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r--giscanner/maintransformer.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 8fb37f89..1b413ed8 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -566,9 +566,10 @@ class MainTransformer(object):
if transfer == OPT_TRANSFER_FLOATING:
transfer = OPT_TRANSFER_NONE
- if not isinstance(target, (ast.Class, ast.Interface)):
+ if (not isinstance(target, (ast.Class, ast.Interface))
+ and node_type.target_giname != 'GLib.Variant'):
message.warn('invalid "transfer" annotation for {0}: '
- 'only valid for object and interface types'.format(target),
+ 'only valid for object and GVariant types'.format(target),
annotations.position)
return