diff options
author | Haru <haru@dotalux.com> | 2016-02-20 23:26:10 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-03-20 18:32:09 +0100 |
commit | 9147fe9473b26ee32aafed65fd02b03f11397629 (patch) | |
tree | 0bb8074db566668129e850d5e7a17e5821add492 /tools | |
parent | 1a8c933f2e74758082eb79d7d924baa4c39bbd95 (diff) | |
download | hercules-9147fe9473b26ee32aafed65fd02b03f11397629.tar.gz hercules-9147fe9473b26ee32aafed65fd02b03f11397629.tar.bz2 hercules-9147fe9473b26ee32aafed65fd02b03f11397629.tar.xz hercules-9147fe9473b26ee32aafed65fd02b03f11397629.zip |
Updated HPMHookGen script to support union arguments
Also removed the no longer necessary DB-related typedefs
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/HPMHookGen/HPMHookGen.pl | 4 |
1 files changed, 2 insertions, 2 deletions
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 |