From 27d4fc33343f0dd4287f0e7b9e6b4ff67c5d8399 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Tue, 28 Aug 2012 15:25:48 -0600 Subject: 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. --- sv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sv.c') diff --git a/sv.c b/sv.c index a3ff695868..1a0e121d2a 100644 --- a/sv.c +++ b/sv.c @@ -13364,7 +13364,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_utf8_punct = sv_dup_inc(proto_perl->Iutf8_punct, param); PL_utf8_xdigit = sv_dup_inc(proto_perl->Iutf8_xdigit, param); PL_utf8_mark = sv_dup_inc(proto_perl->Iutf8_mark, param); - PL_utf8_X_begin = sv_dup_inc(proto_perl->Iutf8_X_begin, param); + PL_utf8_X_regular_begin = sv_dup_inc(proto_perl->Iutf8_X_regular_begin, param); PL_utf8_X_extend = sv_dup_inc(proto_perl->Iutf8_X_extend, param); PL_utf8_X_prepend = sv_dup_inc(proto_perl->Iutf8_X_prepend, param); PL_utf8_X_special_begin = sv_dup_inc(proto_perl->Iutf8_X_special_begin, param); -- cgit v1.2.1