john.tornblom created this revision. john.tornblom added reviewers: eliben, compnerd. john.tornblom added a subscriber: cfe-commits.
http://reviews.llvm.org/D18478 Files: bindings/python/clang/cindex.py Index: bindings/python/clang/cindex.py =================================================================== --- bindings/python/clang/cindex.py +++ bindings/python/clang/cindex.py @@ -3007,6 +3007,9 @@ Type, Type.from_result), + ("clang_getClangVersion", + [], _CXString), + ("clang_getCompletionAvailability", [c_void_p], c_int), @@ -3625,6 +3628,16 @@ return True + @property + def version_string(self): + """Return a version string, suitable for showing to a user + + The version string is not intended to be parsed, and the format is not + guaranteed to be stable. + """ + version = self.lib.clang_getClangVersion() + return version.spelling + def register_enumerations(): for name, value in clang.enumerations.TokenKinds: TokenKind.register(value, name)
Index: bindings/python/clang/cindex.py =================================================================== --- bindings/python/clang/cindex.py +++ bindings/python/clang/cindex.py @@ -3007,6 +3007,9 @@ Type, Type.from_result), + ("clang_getClangVersion", + [], _CXString), + ("clang_getCompletionAvailability", [c_void_p], c_int), @@ -3625,6 +3628,16 @@ return True + @property + def version_string(self): + """Return a version string, suitable for showing to a user + + The version string is not intended to be parsed, and the format is not + guaranteed to be stable. + """ + version = self.lib.clang_getClangVersion() + return version.spelling + def register_enumerations(): for name, value in clang.enumerations.TokenKinds: TokenKind.register(value, name)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits