summaryrefslogtreecommitdiff
path: root/ext/Errno
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2014-09-23 13:51:32 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2014-09-25 08:29:35 +0100
commita3baa5664f4da7f412812e0188d5ac3bab0b8694 (patch)
tree20b7143c05938e4ec8fd54699cecfa9d80f97279 /ext/Errno
parent145bf8eec5be8c17bd592ec8d28efb239bdafa93 (diff)
downloadperl-a3baa5664f4da7f412812e0188d5ac3bab0b8694.tar.gz
Improve Errno parsing of Win32 output
This allows us to pluck "0xC038000FL" rather than "(0xC038000FL" out of "(DWORD)(0xC038000FL)", which means we go into the hex case rather than the eval case, and get the desired result (hex '0xC038000F' returns 3224895503, whereas eval '(0xC038000F' returns nothing). Also allows for "((DWORD)(0xC038000FL))" and other existing formats.
Diffstat (limited to 'ext/Errno')
-rw-r--r--ext/Errno/Errno_pm.PL2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index ca954b720e..579625d113 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -245,7 +245,7 @@ sub write_errno_pm {
my($name,$expr);
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/\(?\(\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
if($expr =~ m/^0[xX]/) {