Python binding fix

Chris Greene archgoon at gmail.com
Sat Apr 26 21:45:46 PDT 2014


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):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140426/47eaeaba/attachment.html>


More information about the cfe-commits mailing list