handy.h: New #define to use new bit
authorKarl Williamson <public@khwilliamson.com>
Mon, 15 Nov 2010 19:56:49 +0000 (12:56 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 22 Nov 2010 21:32:56 +0000 (13:32 -0800)
This creates a new macro for use by regcomp to test the new bit
regarding non-ascii folds.

Because the semantics may change in the future to deal with multi-char
folds, the name of the macro is unwieldy and specific enough that no one
should be tempted to use it.

handy.h

diff --git a/handy.h b/handy.h
index 7f08688..391156a 100644 (file)
--- a/handy.h
+++ b/handy.h
@@ -609,6 +609,7 @@ patched there.  The file as of this writing is cpan/Devel-PPPort/parts/inc/misc
 #   define isUPPER_A(c)  cBOOL(FITS_IN_8_BITS(c) && (PL_charclass[(U8) NATIVE_TO_UNI(c)] & _CC_UPPER_A))
 #   define isWORDCHAR_A(c) cBOOL(FITS_IN_8_BITS(c) && (PL_charclass[(U8) NATIVE_TO_UNI(c)] & _CC_WORDCHAR_A))
 #   define isXDIGIT_A(c)  cBOOL(FITS_IN_8_BITS(c) && (PL_charclass[(U8) NATIVE_TO_UNI(c)] & _CC_XDIGIT_A))
+#   define _NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C(c) ((! cBOOL(FITS_IN_8_BITS(c))) || (PL_charclass[(U8) NATIVE_TO_UNI(c)] & _CC_NONLATIN1_FOLD))
 #else   /* No perl.h. */
 #   define isOCTAL_A(c)  ((c) >= '0' && (c) <= '9')
 #   ifdef EBCDIC