#define PL_unsafe (vTHX->Iunsafe)
#define PL_utf8_foldclosures (vTHX->Iutf8_foldclosures)
#define PL_utf8_mark (vTHX->Iutf8_mark)
-#define PL_utf8_swash_ptrs (vTHX->Iutf8_swash_ptrs)
#define PL_utf8cache (vTHX->Iutf8cache)
#define PL_utf8locale (vTHX->Iutf8locale)
#define PL_warn_locale (vTHX->Iwarn_locale)
*
* The first group of these is ordered in what I (khw) estimate to be the
* frequency of their use. This gives a slight edge to exiting a loop earlier
- * (in reginclass() in regexec.c) */
+ * (in reginclass() in regexec.c). Except \v should be last, as it isn't a
+ * real Posix character class, and some (small) inefficiencies in regular
+ * expression handling would be introduced by putting it in the middle of those
+ * that are. Also, cntrl and ascii come after the others as it may be useful
+ * to group these which have no members that match above Latin1, (or above
+ * ASCII in the latter case) */
+
# define _CC_WORDCHAR 0 /* \w and [:word:] */
# define _CC_DIGIT 1 /* \d and [:digit:] */
# define _CC_ALPHA 2 /* [:alpha:] */
# define _CC_ALPHANUMERIC 7 /* [:alnum:] */
# define _CC_GRAPH 8 /* [:graph:] */
# define _CC_CASED 9 /* [:lower:] or [:upper:] under /i */
-
-#define _FIRST_NON_SWASH_CC 10
-/* The character classes above are implemented with swashes. The second group
- * (just below) contains the ones implemented without. These are also sorted
- * in rough order of the frequency of their use, except that \v should be last,
- * as it isn't a real Posix character class, and some (small) inefficiencies in
- * regular expression handling would be introduced by putting it in the middle
- * of those that are. Also, cntrl and ascii come after the others as it may be
- * useful to group these which have no members that match above Latin1, (or
- * above ASCII in the latter case) */
-
# define _CC_SPACE 10 /* \s, [:space:] */
# define _CC_PSXSPC _CC_SPACE /* XXX Temporary, can be removed
when the deprecated isFOO_utf8()
} _char_class_number;
#endif
-#define POSIX_SWASH_COUNT _FIRST_NON_SWASH_CC
#define POSIX_CC_COUNT (_HIGHEST_REGCOMP_DOT_H_SYNC + 1)
START_EXTERN_C
/* utf8 character class swashes */
PERLVAR(I, utf8_mark, SV *)
-PERLVARA(I, utf8_swash_ptrs, POSIX_SWASH_COUNT, SV *)
PERLVAR(I, seen_deprecated_macro, HV *)
PERLVAR(I, last_swash_hv, HV *)
}
/* clear character classes */
- for (i = 0; i < POSIX_SWASH_COUNT; i++) {
- SvREFCNT_dec(PL_utf8_swash_ptrs[i]);
- PL_utf8_swash_ptrs[i] = NULL;
- }
SvREFCNT_dec(PL_utf8_mark);
SvREFCNT_dec(PL_utf8_foldclosures);
SvREFCNT_dec(PL_InBitmap);
PL_InBitmap = sv_dup_inc(proto_perl->IInBitmap, param);
/* utf8 character class swashes */
- for (i = 0; i < POSIX_SWASH_COUNT; i++) {
- PL_utf8_swash_ptrs[i] = sv_dup_inc(proto_perl->Iutf8_swash_ptrs[i], param);
- }
PL_seen_deprecated_macro = hv_dup_inc(proto_perl->Iseen_deprecated_macro, param);
PL_utf8_mark = sv_dup_inc(proto_perl->Iutf8_mark, param);
{
PERL_ARGS_ASSERT__IS_UTF8_FOO_WITH_LEN;
- assert(classnum < _FIRST_NON_SWASH_CC);
-
return is_utf8_common_with_len(p, e, NULL,
"This is buggy if this gets used",
PL_XPosix_ptrs[classnum]);