diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-01-24 04:10:06 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-01-24 04:10:06 +0000 |
commit | 2c7bcaa1d86987f03a7ba7645b872f18e2feea21 (patch) | |
tree | 6c6027b6d73438c50e11deb7889e2888689f59b5 /bindings/python/clang/cindex.py | |
parent | 149f38abf5e122941090bfb9d1d78dde0859024a (diff) |
cindex/Python: Remove Declaration class, this has been removed from the API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94358 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/python/clang/cindex.py')
-rw-r--r-- | bindings/python/clang/cindex.py | 51 |
1 files changed, 1 insertions, 50 deletions
diff --git a/bindings/python/clang/cindex.py b/bindings/python/clang/cindex.py index 2c7a04e3d9..43d9caf1c4 100644 --- a/bindings/python/clang/cindex.py +++ b/bindings/python/clang/cindex.py @@ -179,16 +179,6 @@ class Cursor(Structure): """ return Cursor_is_def(self) - def get_declaration(self): - """ - Return the underlying declaration for the cursor. If the cursor kind - is a declaration, then this simpy returns the declaration. If the - cursor is a reference, then this returns the referenced declaration. - """ - if not self.is_declaration(): - raise Exception("Cursor does not refer to a Declaration") - return Cursor_decl(self) - def get_definition(self): """ If the cursor is a reference to a declaration or a declaration of @@ -334,48 +324,9 @@ class File(ClangObject): """Return the last modification time of the file, if valid.""" return File_time(self) -class Declaration(ClangObject): - """ - The Declaration class represents a declaration with a translation unit. - """ - def __init__(self, obj): - ClangObject.__init__(self, obj) - - # Figure out the kind of cursor and inject a base class that provides - # some declaration-specific functionality. - self.cursor = Declaration_cursor(self) - - @property - def kind(self): - """Retur the kind of cursor.""" - return self.cursor.kind - - @property - def spelling(self): - """Return the spelling (name) of the declaration.""" - return Declaration_spelling(self) - - def load(self, fun, data = None): - """ - Recursively visit any elements declared or referenced within this - declaration. - """ - f = lambda d, c, x: fun(Declaration(d), c, x) - Declaration_load(self, Callback(f), data) - -# Specific declaration kinds -class ClassDeclaration: - pass - -class FunctionDeclaration: - pass - -class TypedefDeclaration: - pass - # Additional Functions and Types -# Wrap calls to TranslationUnit._load and Decl._load. +# Wrap calls to Cursor_visit. Callback = CFUNCTYPE(None, c_void_p, Cursor, c_void_p) # String Functions |