diff options
author | Karl Williamson <khw@cpan.org> | 2018-07-30 16:00:25 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-08-02 12:59:15 -0600 |
commit | cef721997e14497f2fbc4be17ab736ad7ddfda29 (patch) | |
tree | c8f8385b4cb23f3a506c74fe96cc21a52d198135 /proto.h | |
parent | e8f2a01ecd6ab5d62c6ba1f65a06f72a414a2398 (diff) | |
download | perl-cef721997e14497f2fbc4be17ab736ad7ddfda29.tar.gz |
Move Unicode \p{} definitions to regcomp.c
These are only used in compiling patterns. They previously were placed
in utf8.c because they are large, and there is a copy of regcomp.c in
ext/re, so they would have use twice the space.
This commit changes things so that they only are used and defined in
regcomp.c, (not re_comp.c) so that duplication does not occur. They are
accessed only from one function, and that is also moved from utf8.c to
regcomp.c, only compiled in regcomp.c, and referred to as an external by
re_comp.c
I had to change the names of the table. Previously they started with
'PL_' in case any got exposed, but globvar.t mindlessly assumes that any
such variables in the file regcomp.c are globals, and wrongly complains.
It was easier to just change the prefix to 'UNI_' instead.
A few tables are used in regexec.c, and are duplicated in re_exec.c.
Things could be adjusted so that only one copy is used. I tried this,
but the tables are far more intertwined in regexec.c functions than
the ones changed in this commit, as only a single function accesses
these. Thus doing this would be a lot harder, and the payback isn't all
that much. I started work to make them EXTCONSTs, and then discovered
the intertwining, but left in that work, unused.
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2700,9 +2700,6 @@ PERL_CALLCONV OP* Perl_parse_termexpr(pTHX_ U32 flags); PERL_CALLCONV U32 Perl_parse_unicode_opts(pTHX_ const char **popt); #define PERL_ARGS_ASSERT_PARSE_UNICODE_OPTS \ assert(popt) -PERL_CALLCONV SV * Perl_parse_uniprop_string(pTHX_ const char * const name, const Size_t len, const bool to_fold, bool * invert); -#define PERL_ARGS_ASSERT_PARSE_UNIPROP_STRING \ - assert(name); assert(invert) PERL_CALLCONV void Perl_parser_free(pTHX_ const yy_parser *parser); #define PERL_ARGS_ASSERT_PARSER_FREE \ assert(parser) @@ -5508,6 +5505,9 @@ STATIC void S_output_or_return_posix_warnings(pTHX_ RExC_state_t *pRExC_state, A STATIC void S_parse_lparen_question_flags(pTHX_ RExC_state_t *pRExC_state); #define PERL_ARGS_ASSERT_PARSE_LPAREN_QUESTION_FLAGS \ assert(pRExC_state) +PERL_CALLCONV SV * Perl_parse_uniprop_string(pTHX_ const char * const name, const Size_t len, const bool to_fold, bool * invert); +#define PERL_ARGS_ASSERT_PARSE_UNIPROP_STRING \ + assert(name); assert(invert) STATIC void S_populate_ANYOF_from_invlist(pTHX_ regnode *node, SV** invlist_ptr); #define PERL_ARGS_ASSERT_POPULATE_ANYOF_FROM_INVLIST \ assert(node); assert(invlist_ptr) |