* used in synthetic start class (SSC) nodes, so could be shared should new
* flags be needed for SSCs. */
-#define ANYOF_LOCALE 0x01 /* /l modifier */
+#define ANYOF_LOCALE 0x02 /* /l modifier */
/* The fold is calculated and stored in the bitmap where possible at compile
* time. However under locale, the actual folding varies depending on
* what the locale is at the time of execution, so it has to be deferred until
* then */
-#define ANYOF_LOC_FOLD 0x02
+#define ANYOF_LOC_FOLD 0x04
-#define ANYOF_INVERT 0x04
+/* regexec.c is expecting this to be in the low bit */
+#define ANYOF_INVERT 0x01
/* For the SSC node only, which cannot be inverted, so is shared with that bit.
* This means "Does this SSC match an empty string?" This is used only during
}
}
+#if ANYOF_INVERT != 1
+ /* Depending on compiler optimization cBOOL takes time, so if don't have to
+ * use it, don't */
+# error ANYOF_INVERT needs to be set to 1, or guarded with cBOOL below,
+#endif
+
/* The xor complements the return if to invert: 1^1 = 0, 1^0 = 1 */
- return cBOOL(flags & ANYOF_INVERT) ^ match;
+ return (flags & ANYOF_INVERT) ^ match;
}
STATIC U8 *