[LLVMbugs] [Bug 19573] New: CompletionString.__len__ does not return value in python bindings

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Apr 26 21:25:31 PDT 2014


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

            Bug ID: 19573
           Summary: CompletionString.__len__ does not return value in
                    python bindings
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: libclang
          Assignee: unassignedclangbugs at nondot.org
          Reporter: archgoon at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Issue:
In the python bindings, CompletionString object does not return a value, it
simply evaluates self.num_chunks rather than returning it.

Fix:
diff --git a/bindings/python/clang/cindex.py b/bindings/python/clang/cindex.py
index 516f961..21c3f9a 100644
--- a/bindings/python/clang/cindex.py
+++ b/bindings/python/clang/cindex.py
@@ -1993,7 +1993,7 @@ class CompletionString(ClangObject):
             return "<Availability: %s>" % self

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

     @CachedProperty
     def num_chunks(self):

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140427/d8952b23/attachment.html>


More information about the llvm-bugs mailing list