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 | cced340d0717c3d0e059b532628ad2120789364f (patch) | |
tree | 43daf268b7c433e6201af1dd5d99f2dd87d6b679 /bindings | |
parent | ba2e3ae0a66adc4c70f943063abd494ddbadfc89 (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348127 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/python/clang/cindex.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bindings/python/clang/cindex.py b/bindings/python/clang/cindex.py index f87f830401..939213d302 100644 --- a/bindings/python/clang/cindex.py +++ b/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 |