diff options
author | Karl Williamson <public@khwilliamson.com> | 2014-01-06 13:41:46 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2014-01-09 14:05:45 -0700 |
commit | b24b43f7631ee39f0260fc7bba01dd65715f5aff (patch) | |
tree | b9ad83b5668d976228272e87dd9a158e505f38b3 /utf8.c | |
parent | f25ce84407dda38dcbb46145067fe57d29d1ef7c (diff) | |
download | perl-b24b43f7631ee39f0260fc7bba01dd65715f5aff.tar.gz |
IDStart and IDCont no longer go out to disk
These are the base names for various macros used in parsing identifiers.
Prior to this patch, parsing a code point above Latin1 caused loading
disk files. This patch causes all the information to be compiled into
the Perl binary.
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -32,6 +32,7 @@ #define PERL_IN_UTF8_C #include "perl.h" #include "inline_invlist.c" +#include "charclass_invlists.h" static const char unees[] = "Malformed UTF-8 character (unexpected end of string)"; @@ -1901,20 +1902,28 @@ bool Perl__is_utf8_perl_idstart(pTHX_ const U8 *p) { dVAR; + SV* invlist = NULL; PERL_ARGS_ASSERT__IS_UTF8_PERL_IDSTART; - return is_utf8_common(p, &PL_utf8_perl_idstart, "_Perl_IDStart", NULL); + if (! PL_utf8_perl_idstart) { + invlist = _new_invlist_C_array(_Perl_IDStart_invlist); + } + return is_utf8_common(p, &PL_utf8_perl_idstart, "", invlist); } bool Perl__is_utf8_perl_idcont(pTHX_ const U8 *p) { dVAR; + SV* invlist = NULL; PERL_ARGS_ASSERT__IS_UTF8_PERL_IDCONT; - return is_utf8_common(p, &PL_utf8_perl_idcont, "_Perl_IDCont", NULL); + if (! PL_utf8_perl_idcont) { + invlist = _new_invlist_C_array(_Perl_IDCont_invlist); + } + return is_utf8_common(p, &PL_utf8_perl_idcont, "", invlist); } |