summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-08-28 15:25:48 -0600
committerKarl Williamson <public@khwilliamson.com>2012-08-28 16:24:47 -0600
commit27d4fc33343f0dd4287f0e7b9e6b4ff67c5d8399 (patch)
treef9b098ce06e0da7f0285f9b34c59edd1dec2168a /utf8.c
parent9914684df30835d5561d6d2a768b82e5d8cb535b (diff)
downloadperl-27d4fc33343f0dd4287f0e7b9e6b4ff67c5d8399.tar.gz
Refactor \X regex handling to avoid a typical case table lookup
Prior to this commit 98.4% of Unicode code points that went through \X had to be looked up to see if they begin a grapheme cluster; then looked up again to find that they didn't require special handling. This commit refactors things so only one look-up is required for those 98.4%. It changes the table generated by mktables to accomplish this, and hence the name of it, and references to it are changed to correspond.
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utf8.c b/utf8.c
index 4ba29d859b..dd103cd4ad 100644
--- a/utf8.c
+++ b/utf8.c
@@ -2210,13 +2210,13 @@ Perl_is_utf8_mark(pTHX_ const U8 *p)
}
bool
-Perl_is_utf8_X_begin(pTHX_ const U8 *p)
+Perl_is_utf8_X_regular_begin(pTHX_ const U8 *p)
{
dVAR;
- PERL_ARGS_ASSERT_IS_UTF8_X_BEGIN;
+ PERL_ARGS_ASSERT_IS_UTF8_X_REGULAR_BEGIN;
- return is_utf8_common(p, &PL_utf8_X_begin, "_X_Begin");
+ return is_utf8_common(p, &PL_utf8_X_regular_begin, "_X_Regular_Begin");
}
bool