From: Tobias Grosser Date: Sun, 19 Aug 2012 22:26:15 +0000 (+0000) Subject: [cindex.py] Add CachedProperty to CompletionChunk X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9ee06b2faddf9382af9fa20d1c34b8d05126417;p=clang [cindex.py] Add CachedProperty to CompletionChunk Suggested by: Francisco Lopes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162191 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/bindings/python/clang/cindex.py b/bindings/python/clang/cindex.py index d571b2ade9..0605c2416f 100644 --- a/bindings/python/clang/cindex.py +++ b/bindings/python/clang/cindex.py @@ -1657,16 +1657,16 @@ class CompletionChunk: def __repr__(self): return "{'" + self.spelling + "', " + str(self.kind) + "}" - @property + @CachedProperty def spelling(self): return lib.clang_getCompletionChunkText(self.cs, self.key).spelling - @property + @CachedProperty def kind(self): res = lib.clang_getCompletionChunkKind(self.cs, self.key) return completionChunkKindMap[res] - @property + @CachedProperty def string(self): res = lib.clang_getCompletionChunkCompletionString(self.cs, self.key)