This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
parts/inc/misc: Use parameters in #defines
authorKarl Williamson <khw@cpan.org>
Tue, 6 Aug 2019 22:40:12 +0000 (16:40 -0600)
committerNicolas R <atoomic@cpan.org>
Fri, 27 Sep 2019 22:51:28 +0000 (16:51 -0600)
Aliasing just the macro name does work, but saying
    #define FOO(c) BAR(c)
instead of
    #define FOO BAR

makes it easier for D:P to calculate the lowest release it provides
support for for these macros

(cherry picked from commit 71933851d906d58786a409f028f182c88d5812d9)
Signed-off-by: Nicolas R <atoomic@cpan.org>
dist/Devel-PPPort/parts/inc/misc

index 8bc5e56..975aef6 100644 (file)
@@ -548,26 +548,26 @@ __UNDEFINED__ isXDIGIT(c)       (   isDIGIT(c)                                 \
                                  || ((c) >= 'A' && (c) <= 'F'))
 __UNDEFINED__ isXDIGIT_L1(c)    isXDIGIT(c)
 
-__UNDEFINED__ isALNUM_A         isALNUM
-__UNDEFINED__ isALNUMC_A        isALNUMC
-__UNDEFINED__ isALPHA_A         isALPHA
-__UNDEFINED__ isALPHANUMERIC_A  isALPHANUMERIC
-__UNDEFINED__ isASCII_A         isASCII
-__UNDEFINED__ isBLANK_A         isBLANK
-__UNDEFINED__ isCNTRL_A         isCNTRL
-__UNDEFINED__ isDIGIT_A         isDIGIT
-__UNDEFINED__ isGRAPH_A         isGRAPH
-__UNDEFINED__ isIDCONT_A        isIDCONT
-__UNDEFINED__ isIDFIRST_A       isIDFIRST
-__UNDEFINED__ isLOWER_A         isLOWER
-__UNDEFINED__ isOCTAL_A         isOCTAL
-__UNDEFINED__ isPRINT_A         isPRINT
-__UNDEFINED__ isPSXSPC_A        isPSXSPC
-__UNDEFINED__ isPUNCT_A         isPUNCT
-__UNDEFINED__ isSPACE_A         isSPACE
-__UNDEFINED__ isUPPER_A         isUPPER
-__UNDEFINED__ isWORDCHAR_A     isWORDCHAR
-__UNDEFINED__ isXDIGIT_A       isXDIGIT
+__UNDEFINED__ isALNUM_A(c)         isALNUM(c)
+__UNDEFINED__ isALNUMC_A(c)        isALNUMC(c)
+__UNDEFINED__ isALPHA_A(c)         isALPHA(c)
+__UNDEFINED__ isALPHANUMERIC_A(c)  isALPHANUMERIC(c)
+__UNDEFINED__ isASCII_A(c)         isASCII(c)
+__UNDEFINED__ isBLANK_A(c)         isBLANK(c)
+__UNDEFINED__ isCNTRL_A(c)         isCNTRL(c)
+__UNDEFINED__ isDIGIT_A(c)         isDIGIT(c)
+__UNDEFINED__ isGRAPH_A(c)         isGRAPH(c)
+__UNDEFINED__ isIDCONT_A(c)        isIDCONT(c)
+__UNDEFINED__ isIDFIRST_A(c)       isIDFIRST(c)
+__UNDEFINED__ isLOWER_A(c)         isLOWER(c)
+__UNDEFINED__ isOCTAL_A(c)         isOCTAL(c)
+__UNDEFINED__ isPRINT_A(c)         isPRINT(c)
+__UNDEFINED__ isPSXSPC_A(c)        isPSXSPC(c)
+__UNDEFINED__ isPUNCT_A(c)         isPUNCT(c)
+__UNDEFINED__ isSPACE_A(c)         isSPACE(c)
+__UNDEFINED__ isUPPER_A(c)         isUPPER(c)
+__UNDEFINED__ isWORDCHAR_A(c)     isWORDCHAR(c)
+__UNDEFINED__ isXDIGIT_A(c)       isXDIGIT(c)
 
 /* Until we figure out how to support this in older perls... */
 #if { VERSION >= 5.8.0 }