Skip to content

Commit

Permalink
Support namespace & add missing location
Browse files Browse the repository at this point in the history
  • Loading branch information
NyaMisty committed Feb 12, 2022
1 parent 0e8468e commit 4401055
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ctypeslib/codegen/cursorhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ def INIT_LIST_EXPR(self, cursor):
# now fixed by TranslationUnit.PARSE_SKIP_FUNCTION_BODIES
COMPOUND_STMT = ClangHandler._do_nothing

@log_entity
def NAMESPACE(self, cursor):
for child in cursor.get_children():
self.parse_cursor(child) # FIXME, where is the starElement

################################
# TYPE REFERENCES handlers

Expand Down Expand Up @@ -691,6 +696,9 @@ def _record_decl(self, cursor, _output_type, num=None):
declared_instance = True
else:
obj = self.get_registered(name)
if cursor.is_definition():
self.set_location(obj, cursor)
self.set_comment(obj, cursor)
declared_instance = False
# capture members declaration
members = []
Expand Down

0 comments on commit 4401055

Please sign in to comment.