diff options
author | Serge Guelton <sguelton@quarkslab.com> | 2018-12-03 12:12:48 +0000 |
---|---|---|
committer | Serge Guelton <sguelton@quarkslab.com> | 2018-12-03 12:12:48 +0000 |
commit | 09616bdb4a49d0dfe46cdec8a701ce50bf67eea7 (patch) | |
tree | 7cb4c11cb6fcff38c2de6a9c844c5fbd01c39894 /clang/bindings/python | |
parent | 3de410848c245d0b66697062234f2d6980583092 (diff) | |
download | bcm5719-llvm-09616bdb4a49d0dfe46cdec8a701ce50bf67eea7.tar.gz bcm5719-llvm-09616bdb4a49d0dfe46cdec8a701ce50bf67eea7.zip |
Portable Python script across version
Have all classes derive from object: that's implicitly the default in Python3,
it needs to be done explicilty in Python2.
Differential Revision: https://reviews.llvm.org/D55121
llvm-svn: 348127
Diffstat (limited to 'clang/bindings/python')
-rw-r--r-- | clang/bindings/python/clang/cindex.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/clang/bindings/python/clang/cindex.py b/clang/bindings/python/clang/cindex.py index f87f8304010..939213d302d 100644 --- a/clang/bindings/python/clang/cindex.py +++ b/clang/bindings/python/clang/cindex.py @@ -400,7 +400,7 @@ class Diagnostic(object): @property def ranges(self): - class RangeIterator: + class RangeIterator(object): def __init__(self, diag): self.diag = diag @@ -416,7 +416,7 @@ class Diagnostic(object): @property def fixits(self): - class FixItIterator: + class FixItIterator(object): def __init__(self, diag): self.diag = diag @@ -436,7 +436,7 @@ class Diagnostic(object): @property def children(self): - class ChildDiagnosticsIterator: + class ChildDiagnosticsIterator(object): def __init__(self, diag): self.diag_set = conf.lib.clang_getChildDiagnostics(diag) @@ -2475,8 +2475,8 @@ SpellingCache = { # 20: CompletionChunk.Kind("VerticalSpace") } -class CompletionChunk: - class Kind: +class CompletionChunk(object): + class Kind(object): def __init__(self, name): self.name = name @@ -2563,7 +2563,7 @@ completionChunkKindMap = { 20: CompletionChunk.Kind("VerticalSpace")} class CompletionString(ClangObject): - class Availability: + class Availability(object): def __init__(self, name): self.name = name @@ -2656,7 +2656,7 @@ class CodeCompletionResults(ClangObject): @property def diagnostics(self): - class DiagnosticsItr: + class DiagnosticsItr(object): def __init__(self, ccr): self.ccr= ccr @@ -2958,7 +2958,7 @@ class TranslationUnit(ClangObject): """ Return an iterable (and indexable) object containing the diagnostics. """ - class DiagIterator: + class DiagIterator(object): def __init__(self, tu): self.tu = tu @@ -4090,7 +4090,7 @@ def register_functions(lib, ignore_errors): for f in functionList: register(f) -class Config: +class Config(object): library_path = None library_file = None compatibility_check = True |