[gobject-introspection/wip/meson] giscanner: Fix minor python3 compatibility issue



commit 9c19613ce09df155fff71c3be091841d2d2700ce
Author: Nirbheek Chauhan <nirbheek centricular com>
Date:   Thu Dec 7 19:17:06 2017 +0530

    giscanner: Fix minor python3 compatibility issue
    
    dict.items() returns a tuple in Python2 but it returns an iterator in
    Python3. This is usually fine, except that in this place we also try
    to index the return value which won't work with iterators.

 giscanner/maintransformer.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 23ed410..0d0efac 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -895,7 +895,7 @@ class MainTransformer(object):
             # the number of parameters (@foo) is the same or greater
             # than the number of signal parameters
             if len(block.params) > len(signal.parameters):
-                names = block.params.items()
+                names = [(k, v) for k, v in block.params.items()]
                 # Resolve real parameter names early, so that in later
                 # phase we can refer to them while resolving annotations.
                 for i, param in enumerate(signal.parameters):


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