summaryrefslogtreecommitdiff
path: root/regcomp.h
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 /regcomp.h
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 'regcomp.h')
-rw-r--r--regcomp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/regcomp.h b/regcomp.h
index dc4dede3f2..8eb849cc1e 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -389,8 +389,8 @@ struct regnode_charclass_class {
#define ANYOF_NSPACE ((ANYOF_SPACE) + 1)
#define ANYOF_DIGIT ((_CC_DIGIT) * 2) /* \d */
#define ANYOF_NDIGIT ((ANYOF_DIGIT) + 1)
-#define ANYOF_ALNUMC ((_CC_ALNUMC) * 2) /* [[:alnum:]] isalnum(3), utf8::IsAlnum, ALNUMC */
-#define ANYOF_NALNUMC ((ANYOF_ALNUMC) + 1)
+#define ANYOF_ALPHANUMERIC ((_CC_ALPHANUMERIC) * 2) /* [[:alnum:]] isalnum(3), utf8::IsAlnum */
+#define ANYOF_NALPHANUMERIC ((ANYOF_ALPHANUMERIC) + 1)
#define ANYOF_ALPHA ((_CC_ALPHA) * 2)
#define ANYOF_NALPHA ((ANYOF_ALPHA) + 1)
#define ANYOF_ASCII ((_CC_ASCII) * 2)