3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 11:12:42 +01:00

Replace A-Z0-9_ in function regex with \w to slightly improve readability

This commit is contained in:
Pragmatic Software 2012-11-19 15:52:07 +00:00
parent a6a2b3eeb3
commit c8d77ed230
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ use warnings;
# These are set automatically by the build/commit script # These are set automatically by the build/commit script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 395, BUILD_REVISION => 396,
BUILD_DATE => "2012-11-19", BUILD_DATE => "2012-11-19",
}; };

View File

@ -751,7 +751,7 @@ if($lang eq 'C' or $lang eq 'C99' or $lang eq 'C11' or $lang eq 'C++') {
print "looking for functions, has main: $has_main\n" if $debug >= 2; print "looking for functions, has main: $has_main\n" if $debug >= 2;
my $func_regex = qr/^([ A-Z0-9_*]+)\s+([A-Z0-9_*]+)\s*\((.*?)\s*\)\s*({.*)/ims; my $func_regex = qr/^([ *\w]+)\s+([\w*]+)\s*\((.*?)\s*\)\s*({.*)/ims;
# look for potential functions to extract # look for potential functions to extract
while($preprecode =~ /$func_regex/ms) { while($preprecode =~ /$func_regex/ms) {