From 9147fe9473b26ee32aafed65fd02b03f11397629 Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 20 Feb 2016 23:26:10 +0100 Subject: Updated HPMHookGen script to support union arguments Also removed the no longer necessary DB-related typedefs Signed-off-by: Haru --- tools/HPMHookGen/HPMHookGen.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/HPMHookGen/HPMHookGen.pl b/tools/HPMHookGen/HPMHookGen.pl index 6f7f9e0a4..d471b874d 100755 --- a/tools/HPMHookGen/HPMHookGen.pl +++ b/tools/HPMHookGen/HPMHookGen.pl @@ -148,7 +148,7 @@ sub parse($$) { $type1 .= "$1 "; next; } - if ($current =~ /^(struct|enum)\s+(.*)$/) { # enum and struct names + if ($current =~ /^(struct|enum|union)\s+(.*)$/) { # union, enum and struct names $current = $2 // ''; $type1 .= "$1 "; } @@ -241,7 +241,7 @@ sub parse($$) { $rtinit = ' = DB_OPT_BASE'; } elsif ($x eq 'DBComparator' or $x eq 'DBHasher' or $x eq 'DBReleaser') { # DB function pointers $rtinit = ' = NULL'; - } elsif ($x =~ /^struct\s+.*$/ or $x eq 'DBData' or $x eq 'DBKey') { # Structs and unions + } elsif ($x =~ /^(?:struct|union)\s+.*$/) { # Structs and unions $rtinit = ''; $rtmemset = 1; } elsif ($x =~ /^float|double$/) { # Floating point variables -- cgit v1.2.3-60-g2f50