summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embedvar.h1
-rw-r--r--intrpvar.h1
-rw-r--r--perl.c2
-rw-r--r--sv.c1
-rw-r--r--utf8.c8
5 files changed, 4 insertions, 9 deletions
diff --git a/embedvar.h b/embedvar.h
index 575e2e2aca..f468bd8013 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -335,7 +335,6 @@
#define PL_utf8_X_prepend (vTHX->Iutf8_X_prepend)
#define PL_utf8_alnum (vTHX->Iutf8_alnum)
#define PL_utf8_alpha (vTHX->Iutf8_alpha)
-#define PL_utf8_ascii (vTHX->Iutf8_ascii)
#define PL_utf8_cntrl (vTHX->Iutf8_cntrl)
#define PL_utf8_digit (vTHX->Iutf8_digit)
#define PL_utf8_foldable (vTHX->Iutf8_foldable)
diff --git a/intrpvar.h b/intrpvar.h
index 84534c94c1..dae9b84f1e 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -571,7 +571,6 @@ PERLVAR(I, numeric_radix_sv, SV *) /* The radix separator if not '.' */
/* utf8 character classes */
PERLVAR(I, utf8_alnum, SV *)
-PERLVAR(I, utf8_ascii, SV *)
PERLVAR(I, utf8_alpha, SV *)
PERLVAR(I, utf8_space, SV *)
PERLVAR(I, utf8_perl_space, SV *)
diff --git a/perl.c b/perl.c
index 4285834173..f0fda13ee2 100644
--- a/perl.c
+++ b/perl.c
@@ -983,7 +983,6 @@ perl_destruct(pTHXx)
/* clear utf8 character classes */
SvREFCNT_dec(PL_utf8_alnum);
- SvREFCNT_dec(PL_utf8_ascii);
SvREFCNT_dec(PL_utf8_alpha);
SvREFCNT_dec(PL_utf8_space);
SvREFCNT_dec(PL_utf8_cntrl);
@@ -1003,7 +1002,6 @@ perl_destruct(pTHXx)
SvREFCNT_dec(PL_utf8_idcont);
SvREFCNT_dec(PL_utf8_foldclosures);
PL_utf8_alnum = NULL;
- PL_utf8_ascii = NULL;
PL_utf8_alpha = NULL;
PL_utf8_space = NULL;
PL_utf8_cntrl = NULL;
diff --git a/sv.c b/sv.c
index 6ab04da001..91ccc4d6c3 100644
--- a/sv.c
+++ b/sv.c
@@ -13210,7 +13210,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
/* utf8 character classes */
PL_utf8_alnum = sv_dup_inc(proto_perl->Iutf8_alnum, param);
- PL_utf8_ascii = sv_dup_inc(proto_perl->Iutf8_ascii, param);
PL_utf8_alpha = sv_dup_inc(proto_perl->Iutf8_alpha, param);
PL_utf8_space = sv_dup_inc(proto_perl->Iutf8_space, param);
PL_utf8_cntrl = sv_dup_inc(proto_perl->Iutf8_cntrl, param);
diff --git a/utf8.c b/utf8.c
index 57532cbd54..83cc3d111f 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1236,9 +1236,7 @@ Perl_is_uni_alpha(pTHX_ UV c)
bool
Perl_is_uni_ascii(pTHX_ UV c)
{
- U8 tmpbuf[UTF8_MAXBYTES+1];
- uvchr_to_utf8(tmpbuf, c);
- return is_utf8_ascii(tmpbuf);
+ return isASCII(c);
}
bool
@@ -1554,7 +1552,9 @@ Perl_is_utf8_ascii(pTHX_ const U8 *p)
PERL_ARGS_ASSERT_IS_UTF8_ASCII;
- return is_utf8_common(p, &PL_utf8_ascii, "IsAscii");
+ /* ASCII characters are the same whether in utf8 or not. So the macro
+ * works on both utf8 and non-utf8 representations. */
+ return isASCII(*p);
}
bool