From f3c079d3a6a7d31941d0f7d03e87a28e0b42bfe2 Mon Sep 17 00:00:00 2001 From: Haru Date: Mon, 17 Mar 2014 02:14:03 +0100 Subject: Improved const pointer detection in the HPMHooking generator - Fixes a HPMHooking compile error in d117462. Thanks to Potte. Signed-off-by: Haru --- tools/HPMHookGen/HPMHookGen.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/HPMHookGen') 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; } } -- cgit v1.2.3-60-g2f50