#endif
#include "dquote_static.c"
-#include "charclass_invlists.h"
+#ifndef PERL_IN_XSUB_RE
+# include "charclass_invlists.h"
+#endif
#ifdef op
#undef op
* This uses an exclusive 'or' to find that bit and then inverts it to
* form a mask, with just a single 0, in the bit position where 'S' and
* 's' differ. */
- const U8 S_or_s_mask = ~ ('S' ^ 's');
+ const U8 S_or_s_mask = (U8) ~ ('S' ^ 's');
const U8 s_masked = 's' & S_or_s_mask;
/* One pass is made over the node's string looking for all the
DEBUG_r(if (!PL_colorset) reginitcolors());
+#ifndef PERL_IN_XSUB_RE
/* Initialize these here instead of as-needed, as is quick and avoids
* having to test them each time otherwise */
if (! PL_AboveLatin1) {
PL_PosixBlank = _new_invlist_C_array(PosixBlank_invlist);
PL_XPosixBlank = _new_invlist_C_array(XPosixBlank_invlist);
+ PL_L1Cased = _new_invlist_C_array(L1Cased_invlist);
+
PL_PosixCntrl = _new_invlist_C_array(PosixCntrl_invlist);
PL_XPosixCntrl = _new_invlist_C_array(XPosixCntrl_invlist);
PL_PosixXDigit = _new_invlist_C_array(PosixXDigit_invlist);
PL_XPosixXDigit = _new_invlist_C_array(XPosixXDigit_invlist);
}
+#endif
exp = SvPV(pattern, plen);
case ANYOF_LOWER:
case ANYOF_NLOWER:
{ /* These require special handling, as they differ under
- folding, matching the corresponding Alpha property */
+ folding, matching Cased there (which in the ASCII range
+ is the same as Alpha */
SV* ascii_source;
SV* l1_source;
if (FOLD && ! LOC) {
ascii_source = PL_PosixAlpha;
- l1_source = PL_L1PosixAlpha;
- Xname = "__XposixAlpha_i";
+ l1_source = PL_L1Cased;
+ Xname = "Cased";
}
else {
ascii_source = PL_PosixLower;
if (FOLD && ! LOC) {
ascii_source = PL_PosixAlpha;
- l1_source = PL_L1PosixAlpha;
- Xname = "__XposixAlpha_i";
+ l1_source = PL_L1Cased;
+ Xname = "Cased";
}
else {
ascii_source = PL_PosixUpper;
* there should not be overlap unless is /d rules. */
_invlist_invert(nonbitmap);
+ /* Any swash can't be used as-is, because we've inverted things */
+ if (swash) {
+ SvREFCNT_dec(swash);
+ swash = NULL;
+ }
+
for (i = 0; i < 256; ++i) {
if (ANYOF_BITMAP_TEST(ret, i)) {
ANYOF_BITMAP_CLEAR(ret, i);
}
return ret;
}
-#undef _C_C_T_
/* reg_skipcomment()