diff options
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 |