summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-12-11 20:47:25 -0700
committerKarl Williamson <public@khwilliamson.com>2012-12-22 11:11:27 -0700
commit15861f948fe52aa0c72233cd9dfc0190bfa3fbb1 (patch)
tree68e1d074c5f89237a0bcbc739836c5aac749cac9 /utf8.c
parentfbc19f27a35cc90f77285a47de2ff0dd21ff50c6 (diff)
downloadperl-15861f948fe52aa0c72233cd9dfc0190bfa3fbb1.tar.gz
handy.h: Create isALPHANUMERIC() and kin
Perl has had an undocumented macro isALNUMC() for a long time. I want to document it, but the name is very obscure. Neither Yves nor I are sure what it is. My best guess is "C's alnum". It corresponds to /[[:alnum:]]/, and so its best name would be isALNUM(). But that is the name long given to what matches \w. A new synonym, isWORDCHAR(), has been in place for several releases for that, but the old isALNUM() should remain for backwards compatibility. I don't think that the name isALNUMC() should be published, as it is too close to isALNUM(). I finally came to the conclusion that isALPHANUMERIC() is the best name; it describes its purpose clearly; the disadvantage is its long length. I doubt that it will get much use, but we need something, I think, that we can publish to accomplish this functionality. This commit also converts core uses of isALNUMC to isALPHANUMERIC. (I intended to that separately, but made a mistake in rebasing, and combined the two patches; and it seemed like not a big enough problem to separate them out again.)
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utf8.c b/utf8.c
index 01ea070fc7..2a5aff1aea 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1848,7 +1848,7 @@ bool
Perl_is_uni_alnumc_lc(pTHX_ UV c)
{
if (c < 256) {
- return isALNUMC_LC(UNI_TO_NATIVE(c));
+ return isALPHANUMERIC_LC(UNI_TO_NATIVE(c));
}
return is_uni_alnumc(c);
}