Skip to content

Commit a2cb8c7

Browse files
committed
scanner.py: add support for "original_type" attribute of "Argument" tags in XML. For array args this means avoiding losing the delcared width of the array and having its decl_type show as pointer_t
1 parent 6eb7b9e commit a2cb8c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pygccxml/parser/scanner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
XML_AN_STATIC = "static"
5757
XML_AN_THROW = "throw"
5858
XML_AN_TYPE = "type"
59+
XML_AN_ORIGINAL_TYPE = "original_type"
5960
XML_AN_VIRTUAL = "virtual"
6061
XML_AN_VOLATILE = "volatile"
6162
XML_NN_ARGUMENT = "Argument"
@@ -558,7 +559,7 @@ def __read_argument(self, attrs):
558559
XML_AN_NAME,
559560
'arg%d' % len(
560561
self.__inst.arguments))
561-
argument.decl_type = attrs[XML_AN_TYPE]
562+
argument.decl_type = attrs.get(XML_AN_ORIGINAL_TYPE, XML_AN_TYPE)
562563
argument.default_value = attrs.get(XML_AN_DEFAULT)
563564
self.__read_attributes(argument, attrs)
564565
self.__inst.arguments.append(argument)

0 commit comments

Comments
 (0)