#define PL_unsafe (vTHX->Iunsafe)
#define PL_utf8_X_extend (vTHX->Iutf8_X_extend)
#define PL_utf8_X_regular_begin (vTHX->Iutf8_X_regular_begin)
-#define PL_utf8_alnum (vTHX->Iutf8_alnum)
-#define PL_utf8_alnumc (vTHX->Iutf8_alnumc)
-#define PL_utf8_alpha (vTHX->Iutf8_alpha)
#define PL_utf8_charname_begin (vTHX->Iutf8_charname_begin)
#define PL_utf8_charname_continue (vTHX->Iutf8_charname_continue)
-#define PL_utf8_digit (vTHX->Iutf8_digit)
#define PL_utf8_foldable (vTHX->Iutf8_foldable)
#define PL_utf8_foldclosures (vTHX->Iutf8_foldclosures)
-#define PL_utf8_graph (vTHX->Iutf8_graph)
#define PL_utf8_idcont (vTHX->Iutf8_idcont)
#define PL_utf8_idstart (vTHX->Iutf8_idstart)
-#define PL_utf8_lower (vTHX->Iutf8_lower)
#define PL_utf8_mark (vTHX->Iutf8_mark)
#define PL_utf8_perl_idstart (vTHX->Iutf8_perl_idstart)
-#define PL_utf8_print (vTHX->Iutf8_print)
-#define PL_utf8_punct (vTHX->Iutf8_punct)
+#define PL_utf8_swash_ptrs (vTHX->Iutf8_swash_ptrs)
#define PL_utf8_tofold (vTHX->Iutf8_tofold)
#define PL_utf8_tolower (vTHX->Iutf8_tolower)
#define PL_utf8_totitle (vTHX->Iutf8_totitle)
#define PL_utf8_toupper (vTHX->Iutf8_toupper)
-#define PL_utf8_upper (vTHX->Iutf8_upper)
#define PL_utf8_xidcont (vTHX->Iutf8_xidcont)
#define PL_utf8_xidstart (vTHX->Iutf8_xidstart)
#define PL_utf8cache (vTHX->Iutf8cache)
} _char_class_number;
#endif
+#define POSIX_SWASH_COUNT _FIRST_NON_SWASH_CC
+
+#define PL_utf8_alnum PL_utf8_swash_ptrs[_CC_WORDCHAR]
+#define PL_utf8_alnumc PL_utf8_swash_ptrs[_CC_ALNUMC]
+#define PL_utf8_alpha PL_utf8_swash_ptrs[_CC_ALPHA]
+#define PL_utf8_graph PL_utf8_swash_ptrs[_CC_GRAPH]
+#define PL_utf8_digit PL_utf8_swash_ptrs[_CC_DIGIT]
+#define PL_utf8_upper PL_utf8_swash_ptrs[_CC_UPPER]
+#define PL_utf8_lower PL_utf8_swash_ptrs[_CC_LOWER]
+#define PL_utf8_print PL_utf8_swash_ptrs[_CC_PRINT]
+#define PL_utf8_punct PL_utf8_swash_ptrs[_CC_PUNCT]
+
# ifdef DOINIT
EXTCONST U32 PL_charclass[] = {
# include "l1_char_class_tab.h"
PERLVAR(I, HasMultiCharFold, SV *)
/* utf8 character class swashes */
-PERLVAR(I, utf8_alnum, SV *) /* Should really be named "utf8_wordchar" */
-PERLVAR(I, utf8_alnumc, SV *)
-PERLVAR(I, utf8_alpha, SV *)
-PERLVAR(I, utf8_graph, SV *)
-PERLVAR(I, utf8_digit, SV *)
-PERLVAR(I, utf8_upper, SV *)
-PERLVAR(I, utf8_lower, SV *)
-PERLVAR(I, utf8_print, SV *)
-PERLVAR(I, utf8_punct, SV *)
PERLVAR(I, utf8_mark, SV *)
PERLVAR(I, utf8_X_regular_begin, SV *)
PERLVAR(I, utf8_X_extend, SV *)
PERLVAR(I, utf8_tofold, SV *)
PERLVAR(I, utf8_charname_begin, SV *)
PERLVAR(I, utf8_charname_continue, SV *)
+PERLVARA(I, utf8_swash_ptrs, POSIX_SWASH_COUNT, SV *)
PERLVAR(I, last_swash_hv, HV *)
PERLVAR(I, last_swash_tmps, U8 *)
PERLVAR(I, last_swash_slen, STRLEN)
PL_HasMultiCharFold= sv_dup_inc(proto_perl->IHasMultiCharFold, param);
/* utf8 character class swashes */
- PL_utf8_alnum = sv_dup_inc(proto_perl->Iutf8_alnum, param);
- PL_utf8_alnumc = sv_dup_inc(proto_perl->Iutf8_alnumc, param);
- PL_utf8_alpha = sv_dup_inc(proto_perl->Iutf8_alpha, param);
- PL_utf8_graph = sv_dup_inc(proto_perl->Iutf8_graph, param);
- PL_utf8_digit = sv_dup_inc(proto_perl->Iutf8_digit, param);
- PL_utf8_upper = sv_dup_inc(proto_perl->Iutf8_upper, param);
- PL_utf8_lower = sv_dup_inc(proto_perl->Iutf8_lower, param);
- PL_utf8_print = sv_dup_inc(proto_perl->Iutf8_print, param);
- PL_utf8_punct = sv_dup_inc(proto_perl->Iutf8_punct, param);
+ for (i = 0; i < POSIX_SWASH_COUNT; i++) {
+ PL_utf8_swash_ptrs[i] = sv_dup_inc(proto_perl->Iutf8_swash_ptrs[i], param);
+ }
PL_utf8_mark = sv_dup_inc(proto_perl->Iutf8_mark, param);
PL_utf8_X_regular_begin = sv_dup_inc(proto_perl->Iutf8_X_regular_begin, param);
PL_utf8_X_extend = sv_dup_inc(proto_perl->Iutf8_X_extend, param);