diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2014-09-24 08:53:39 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2014-09-25 08:29:36 +0100 |
commit | 2d4a3ccef465111dae0e5e71cf008e97efeb057c (patch) | |
tree | c98cf00911366cd689964e1d0f987909b71a5681 /ext/Errno | |
parent | 1ef3f55063eff0bda07fa2251ec16a7807dfb602 (diff) | |
download | perl-2d4a3ccef465111dae0e5e71cf008e97efeb057c.tar.gz |
Errno parsing: Don't match hex numbers in parts of function names
This stops __stdcall being seen as a hex number and turned into __stdca.
Also include _ in the pattern to match function names so that that gets
skipped anyway.
Diffstat (limited to 'ext/Errno')
-rw-r--r-- | ext/Errno/Errno_pm.PL | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL index 9faa743ae0..1a75fcb287 100644 --- a/ext/Errno/Errno_pm.PL +++ b/ext/Errno/Errno_pm.PL @@ -246,8 +246,8 @@ sub write_errno_pm { next unless ($name, $expr) = /"(.*?)"\s*\[\s*\[\s*(.*?)\s*\]\s*\]/; next if $name eq $expr; $expr =~ s/\(?\(\s*[a-z_]\w*\s*\)\(?([^\)]+)\)?\)?/$1/i; # ((type)0xcafebabe) at alia - $expr =~ s/((?:0x)?[0-9a-fA-F]+)[luLU]+\b/$1/g; # 2147483647L et alia - next if $expr =~ m/^[a-zA-Z]+$/; # skip some Win32 functions + $expr =~ s/\b((?:0x)?[0-9a-f]+)[LU]+\b/$1/gi; # 2147483647L et alia + next if $expr =~ m/^[a-z_]+$/i; # skip function names if($expr =~ m/^0[xX]/) { $err{$name} = hex $expr; } |