diff options
author | Colin Walters <walters@verbum.org> | 2015-09-28 11:17:07 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2015-09-28 11:17:29 -0400 |
commit | d1086a641d6e46140b13996ff5a3bfbb90662dd5 (patch) | |
tree | 23a6ccf19108b5964cde6dbbf35892613afc7e3d /giscanner/maintransformer.py | |
parent | ea73b39cfc230e5cb8e5c56ffc83988c573a9513 (diff) | |
download | gobject-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.py | 5 |
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 |