summaryrefslogtreecommitdiff
path: root/tools/HPMHookGen
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-02-20 23:26:10 +0100
committerHaru <haru@dotalux.com>2016-03-20 18:32:09 +0100
commit9147fe9473b26ee32aafed65fd02b03f11397629 (patch)
tree0bb8074db566668129e850d5e7a17e5821add492 /tools/HPMHookGen
parent1a8c933f2e74758082eb79d7d924baa4c39bbd95 (diff)
downloadhercules-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/HPMHookGen')
-rwxr-xr-xtools/HPMHookGen/HPMHookGen.pl4
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