This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ext/B/Makefile.PL: spot hex defines
authorDavid Mitchell <davem@iabyn.com>
Sun, 2 Nov 2014 16:01:00 +0000 (16:01 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sun, 7 Dec 2014 09:07:30 +0000 (09:07 +0000)
The regex in ext/B/Makefile.PL was failing to find C constants of the
form

    #define FOO 0xNNN

where NNN contained one or more [a-fA-F] chars

With this change it imports a few more constants:

    CXTYPEMASK
    GVf_IMPORTED
    RV2CVOPCV_FLAG_MASK
    OPpARG4_MASK
    OPpPADRANGE_COUNTMASK

ext/B/Makefile.PL

index 8708c0d..e34b867 100644 (file)
@@ -44,6 +44,7 @@ foreach my $tuple (['cop.h'],
             ( [()|\dx]+ [UuLl]{0,2}            # Parens, '|', digits, 'x',
                                                # followed by optional long,
                                                # unsigned qualifiers
+            | 0x[0-9a-fA-F]+                   # hex values
             | \(? \d+ [UuLl]{0,2} \s* << .*?   # digits left shifted by anything
                                                # followed by optional
                                                # long, unsigned qualifiers