From b02fdc8e259fe977c1065389c042be69e2985bdf Mon Sep 17 00:00:00 2001 From: Erik Larsson Date: Sat, 20 Apr 2024 10:32:55 +0200 Subject: [PATCH 2/2] scripts: update regex for #defines Commit fdb3594b27aee315ad56af361512800266672582 in tpm2-tss changed the structure of some defines, so fix the regex. Signed-off-by: Erik Larsson --- scripts/prepare_headers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/prepare_headers.py b/scripts/prepare_headers.py index 6ca9b64..a7529b3 100644 --- a/scripts/prepare_headers.py +++ b/scripts/prepare_headers.py @@ -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 -- 2.43.2