This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a080cc
)
ext/B/defsubs_h.PL: teach to allow exprs with <<
author
Karl Williamson
<khw@khw-desktop.(none)>
Tue, 20 Jul 2010 03:51:32 +0000
(21:51 -0600)
committer
Rafael Garcia-Suarez
<rgs@consttype.org>
Thu, 29 Jul 2010 10:10:18 +0000
(12:10 +0200)
Allow #defines which have left shift operators in them.
ext/B/defsubs_h.PL
patch
|
blob
|
blame
|
history
diff --git
a/ext/B/defsubs_h.PL
b/ext/B/defsubs_h.PL
index
f8fa1ed
..
d8e1439
100644
(file)
--- a/
ext/B/defsubs_h.PL
+++ b/
ext/B/defsubs_h.PL
@@
-84,7
+84,11
@@
foreach my $tuple (['op.h'],['cop.h'],['regexp.h','RXf_'])
open(OPH,"$path") || die "Cannot open $path:$!";
while (<OPH>)
{
- doconst($1) if (/#define\s+($pfx\w+)\s+([\(\)\|\dx]+)\s*(?:$|\/\*)/);
+ doconst($1) if (/ \#define \s+ ( $pfx \w+ ) \s+
+ ( [()|\dx]+ # Parens, '|', digits, 'x'
+ | \(? \d+ \s* << .*? # digits left shifted by anything
+ ) \s* (?: $| \/ \* ) # ending at comment or $
+ /x);
}
close(OPH);
}