Skip to content

Commit 4401055

Browse files
committed
Support namespace & add missing location
1 parent 0e8468e commit 4401055

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ctypeslib/codegen/cursorhandler.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ def INIT_LIST_EXPR(self, cursor):
9696
# now fixed by TranslationUnit.PARSE_SKIP_FUNCTION_BODIES
9797
COMPOUND_STMT = ClangHandler._do_nothing
9898

99+
@log_entity
100+
def NAMESPACE(self, cursor):
101+
for child in cursor.get_children():
102+
self.parse_cursor(child) # FIXME, where is the starElement
103+
99104
################################
100105
# TYPE REFERENCES handlers
101106

@@ -691,6 +696,9 @@ def _record_decl(self, cursor, _output_type, num=None):
691696
declared_instance = True
692697
else:
693698
obj = self.get_registered(name)
699+
if cursor.is_definition():
700+
self.set_location(obj, cursor)
701+
self.set_comment(obj, cursor)
694702
declared_instance = False
695703
# capture members declaration
696704
members = []

0 commit comments

Comments
 (0)