summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2014-05-06 13:22:35 -0400
committerRyan Lortie <desrt@desrt.ca>2014-05-06 13:26:00 -0400
commit40768637bcb49e2a91cff76bab2b8207b7981b22 (patch)
tree413d0e2a37e0c94ad8cb0e307560c6e1f413af42
parentbb9b9bd77309134ad5d1b06a0af9755a3e93a5d8 (diff)
downloadgobject-introspection-40768637bcb49e2a91cff76bab2b8207b7981b22.tar.gz
giscanner: fix a comparison
In the case that a parameter has not been explicitly annotated, the value of node.direction will be None, not 'in'. Instead of comparing as == 'in' we should therefore check for being != 'out'. https://bugzilla.gnome.org/show_bug.cgi?id=660879
-rw-r--r--giscanner/maintransformer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 90b702d8..19e3f24c 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -591,7 +591,7 @@ class MainTransformer(object):
else:
node.nullable = True
- if (node.direction == ast.PARAM_DIRECTION_IN and
+ if (node.direction != ast.PARAM_DIRECTION_OUT and
(node.type.target_giname == 'Gio.AsyncReadyCallback' or
node.type.target_giname == 'Gio.Cancellable')):
node.nullable = True