Skip to content

Commit a0f2e07

Browse files
committed
Added support for gcc attribute
Ignoring __attribute__
1 parent 16ea409 commit a0f2e07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dissect/cstruct/cstruct.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def _enums(self, data):
368368
def _structs(self, data):
369369
compiler = Compiler(self.cstruct)
370370
r = re.finditer(
371-
r'(#(?P<flags>(?:compile))\s+)?((?P<typedef>typedef)\s+)?(?P<type>[^\s]+)\s+(?P<name>[^\s]+)?(?P<fields>\s*\{[^}]+\}(?P<defs>\s+[^;\n]+)?)?\s*;',
371+
r'(#(?P<flags>(?:compile))\s+)?((?P<typedef>typedef)\s+)?(?P<type>[^\s]+)\s+(__attribute__\(\([^)]+\)\)\s*)?(?P<name>[^\s]+)?(?P<fields>\s*\{[^}]+\}(?P<defs>\s+[^;\n]+)?)?\s*;',
372372
data,
373373
)
374374
for t in r:

0 commit comments

Comments
 (0)