From e0e8eb311473b22479d5faa6d0a462152ca5ce32 Mon Sep 17 00:00:00 2001 From: "Christoph M. Wintersteiger" Date: Thu, 25 Oct 2018 13:12:05 +0100 Subject: [PATCH] ECDH: Add #ifdef filter to tests/scripts/list-enum-consts.pl This allows the use of #ifdef ... #endif in enum definitions (e.g., mbedtls_ecdh_variant in ecdh.h). --- tests/scripts/list-enum-consts.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/scripts/list-enum-consts.pl b/tests/scripts/list-enum-consts.pl index cfef300a6..65cec3f15 100755 --- a/tests/scripts/list-enum-consts.pl +++ b/tests/scripts/list-enum-consts.pl @@ -22,7 +22,7 @@ while (<>) $state = 'in'; } elsif( $state eq 'in' and /}/ ) { $state = 'out'; - } elsif( $state eq 'in' ) { + } elsif( $state eq 'in' and not (/^#if/ or /#endif/)) { s/=.*//; s!/\*.*!!; s/,.*//; s/\s+//g; chomp; push @consts, $_ if $_; }