Fix for Bug 19573.

http://llvm.org/bugs/show_bug.cgi?id=19573

The __len__ function for CompletionString does not return a value. This
results in a TypeError when invoking it as the return type is always None.

Index: bindings/python/clang/cindex.py
===================================================================
--- bindings/python/clang/cindex.py    (revision 207347)
+++ bindings/python/clang/cindex.py    (working copy)
@@ -1993,7 +1993,7 @@
             return "<Availability: %s>" % self

     def __len__(self):
-        self.num_chunks
+        return self.num_chunks

     @CachedProperty
     def num_chunks(self):
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to