diff options
author | Garrett Regier <garrett.regier@riftio.com> | 2015-07-06 11:45:33 -0700 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2015-09-29 23:46:56 -0400 |
commit | cd2a5a7bb85db1e823833dd6082da5aa9ad19d0b (patch) | |
tree | a7c00607b4e0dcde73ca401b1b5119a4f224d2d1 /giscanner/maintransformer.py | |
parent | e0027719e2db40ee22745087c291e66088a4f30d (diff) | |
download | gobject-introspection-cd2a5a7bb85db1e823833dd6082da5aa9ad19d0b.tar.gz |
scanner: Fix allow-none on return values
The optional annotation was being applied which
is invalid for return values.
https://bugzilla.gnome.org/show_bug.cgi?id=752029
Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r-- | giscanner/maintransformer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py index 8954fa70..da904cfd 100644 --- a/giscanner/maintransformer.py +++ b/giscanner/maintransformer.py @@ -653,7 +653,8 @@ class MainTransformer(object): node.optional = True if ANN_ALLOW_NONE in annotations: - if node.direction == ast.PARAM_DIRECTION_OUT: + if (node.direction == ast.PARAM_DIRECTION_OUT and + not isinstance(node, ast.Return)): node.optional = True else: node.nullable = True |