summaryrefslogtreecommitdiff
path: root/giscanner/maintransformer.py
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r--giscanner/maintransformer.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index d41b55f0..a670a0a2 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -558,18 +558,9 @@ usage is void (*_gtk_reserved1)(void);"""
options = {}
if isinstance(parent, (ast.Function, ast.VFunction)):
scope = options.get(OPT_SCOPE)
- if scope:
- scope = scope.one()
- if scope not in [ast.PARAM_SCOPE_CALL,
- ast.PARAM_SCOPE_ASYNC,
- ast.PARAM_SCOPE_NOTIFIED]:
- message.warn(
- "Invalid scope %r for parameter %r" % (scope,
- param.argname),
- tag.position)
- else:
- param.scope = scope
- param.transfer = ast.PARAM_TRANSFER_NONE
+ if scope and scope.length() == 1:
+ param.scope = scope.one()
+ param.transfer = ast.PARAM_TRANSFER_NONE
destroy = options.get(OPT_DESTROY)
if destroy: