summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-12-06 21:41:23 -0700
committerKarl Williamson <public@khwilliamson.com>2012-12-09 10:30:02 -0700
commit61b19385aad9b4e3473d7791345d04196cee4e09 (patch)
tree95faca605621655f95f9ff70410894b1f91af769 /utf8.c
parentcc8ab7c00e799e0a0242fced558ccb06b2cbb566 (diff)
downloadperl-61b19385aad9b4e3473d7791345d04196cee4e09.tar.gz
Deprecate some functions in utf8.c
These functions are not used by the Perl core. Code should be using the equivalent macros in handy.h that may avoid a function call.
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/utf8.c b/utf8.c
index 215ff7a782..e1597bce5f 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1498,12 +1498,24 @@ Perl_is_uni_alnumc(pTHX_ UV c)
return is_utf8_alnumc(tmpbuf);
}
+bool /* Internal function so we can deprecate the external one, and call
+ this one from other deprecated functions in this file */
+S_is_utf8_idfirst(pTHX_ const U8 *p)
+{
+ dVAR;
+
+ if (*p == '_')
+ return TRUE;
+ /* is_utf8_idstart would be more logical. */
+ return is_utf8_common(p, &PL_utf8_idstart, "IdStart");
+}
+
bool
Perl_is_uni_idfirst(pTHX_ UV c)
{
U8 tmpbuf[UTF8_MAXBYTES+1];
uvchr_to_utf8(tmpbuf, c);
- return is_utf8_idfirst(tmpbuf);
+ return S_is_utf8_idfirst(aTHX_ tmpbuf);
}
bool
@@ -1873,7 +1885,7 @@ Perl_is_uni_blank_lc(pTHX_ UV c)
if (c < 256) {
return isBLANK_LC(UNI_TO_NATIVE(c));
}
- return is_uni_blank(c);
+ return isBLANK_uni(c);
}
bool
@@ -1882,7 +1894,7 @@ Perl_is_uni_space_lc(pTHX_ UV c)
if (c < 256) {
return isSPACE_LC(UNI_TO_NATIVE(c));
}
- return is_uni_space(c);
+ return isSPACE_uni(c);
}
bool
@@ -1918,7 +1930,7 @@ Perl_is_uni_cntrl_lc(pTHX_ UV c)
if (c < 256) {
return isCNTRL_LC(UNI_TO_NATIVE(c));
}
- return is_uni_cntrl(c);
+ return 0;
}
bool
@@ -1954,7 +1966,7 @@ Perl_is_uni_xdigit_lc(pTHX_ UV c)
if (c < 256) {
return isXDIGIT_LC(UNI_TO_NATIVE(c));
}
- return is_uni_xdigit(c);
+ return isXDIGIT_uni(c);
}
U32
@@ -2050,10 +2062,7 @@ Perl_is_utf8_idfirst(pTHX_ const U8 *p) /* The naming is historical. */
PERL_ARGS_ASSERT_IS_UTF8_IDFIRST;
- if (*p == '_')
- return TRUE;
- /* is_utf8_idstart would be more logical. */
- return is_utf8_common(p, &PL_utf8_idstart, "IdStart");
+ return S_is_utf8_idfirst(aTHX_ p);
}
bool