Skip to content

Commit efdb7df

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 efdb7df

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pygccxml/parser/scanner.py

Lines changed: 5 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,10 @@ 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(
563+
XML_AN_ORIGINAL_TYPE,
564+
attrs.get(XML_AN_TYPE)
565+
)
562566
argument.default_value = attrs.get(XML_AN_DEFAULT)
563567
self.__read_attributes(argument, attrs)
564568
self.__inst.arguments.append(argument)

0 commit comments

Comments
 (0)