summaryrefslogtreecommitdiff
path: root/tools/HPMHookGen
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-03-17 02:14:03 +0100
committerHaru <haru@dotalux.com>2014-03-17 02:16:02 +0100
commitf3c079d3a6a7d31941d0f7d03e87a28e0b42bfe2 (patch)
treedb009a369d2dbfb3ad3ad582ea649ed5ffb263e5 /tools/HPMHookGen
parentd117462c3921a4f7a5eaa3c1760d774e81ff8fba (diff)
downloadhercules-f3c079d3a6a7d31941d0f7d03e87a28e0b42bfe2.tar.gz
hercules-f3c079d3a6a7d31941d0f7d03e87a28e0b42bfe2.tar.bz2
hercules-f3c079d3a6a7d31941d0f7d03e87a28e0b42bfe2.tar.xz
hercules-f3c079d3a6a7d31941d0f7d03e87a28e0b42bfe2.zip
Improved const pointer detection in the HPMHooking generator
- Fixes a HPMHooking compile error in d117462. Thanks to Potte. 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 b035687e2..e83d5d9a0 100755
--- a/tools/HPMHookGen/HPMHookGen.pl
+++ b/tools/HPMHookGen/HPMHookGen.pl
@@ -138,7 +138,7 @@ sub parse($$) {
}
last; # No other modifiers
}
- if ($current =~ /^\s*(\w+)([*\s]*)(\w*)\s*((?:\[\])?)$/) { # Variable type and name
+ if ($current =~ /^\s*(\w+)((?:const|[*\s])*)(\w*)\s*((?:\[\])?)$/) { # Variable type and name
$type1 .= trim($1);
$indir = trim($2 // '');
$var = trim($3 // '');
@@ -147,7 +147,7 @@ sub parse($$) {
} else { # Unsupported
$notes .= "\n/* Error: Unhandled var type '$current' */";
print "Error: Unhandled var type '$current'\n";
- push(@args, {$current});
+ push(@args, { var => $current });
next;
}
}