Skip to content

Commit

Permalink
scripts: update regex for #defines
Browse files Browse the repository at this point in the history
Commit fdb3594b27aee315ad56af361512800266672582 in tpm2-tss changed
the structure of some defines, so fix the regex.

Signed-off-by: Erik Larsson <who+github@cnackers.org>
  • Loading branch information
whooo committed Apr 20, 2024
1 parent a04715c commit b02fdc8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/prepare_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def remove_common_guards(s):

# Restructure #defines with ...
s = re.sub("(#define [A-Za-z0-9_]+) +\(\(.*?\) \(.*?\)\)", "\g<1>...", s)
s = re.sub("(#define [A-Za-z0-9_]+) +\(\(\(.*?\) .*\)", "\g<1>...", s)
s = re.sub("(#define [A-Za-z0-9_]+) +\(\(.*?\).*?\) ", "\g<1>...", s)
s = re.sub(
"(#define [A-Za-z0-9_]+) .*\n.*?.*\)\)", "\g<1>...", s, flags=re.MULTILINE
Expand Down

0 comments on commit b02fdc8

Please sign in to comment.