[gobject-introspection] giscanner: fix a comparison



commit 40768637bcb49e2a91cff76bab2b8207b7981b22
Author: Ryan Lortie <desrt desrt ca>
Date:   Tue May 6 13:22:35 2014 -0400

    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

 giscanner/maintransformer.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 90b702d..19e3f24 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]