diff options
author | Karl Williamson <khw@cpan.org> | 2015-09-20 21:25:13 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2015-10-11 10:48:31 -0600 |
commit | 3e699fa01bec7dca385966fb2e0bd8150ad039b6 (patch) | |
tree | b1d7c07f8c0c3c2745a917f327ca77fd3130b843 /proto.h | |
parent | f400bbf00eccb191120b1fd72ccece07f2f3e1c1 (diff) | |
download | perl-3e699fa01bec7dca385966fb2e0bd8150ad039b6.tar.gz |
regcomp.c: Split function into two functions
Sometimes we want to move to the next non-ignored character in the
input. The nextchar() function does that (but buggily in UTF-8).
And sometimes we are already at the next character, but if it is one
that should be ignored, we want to move to the first one that isn't.
This commit creates a function to do the second task by extracting the
code in nextchar() to it, and making nextchar() a lightweight wrapper
around it, and hence likely to be optimized out by the compiler.
This is a step in the direction of fixing the UTF-8 problems with
nextchar(), and fixing some other bugs. The new function has added
generality which won't be used until a later commit.
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -4803,6 +4803,9 @@ STATIC void S_scan_commit(pTHX_ const RExC_state_t *pRExC_state, struct scan_dat STATIC void S_set_ANYOF_arg(pTHX_ RExC_state_t* const pRExC_state, regnode* const node, SV* const cp_list, SV* const runtime_defns, SV* const only_utf8_locale_list, SV* const swash, const bool has_user_defined_property); #define PERL_ARGS_ASSERT_SET_ANYOF_ARG \ assert(pRExC_state); assert(node) +STATIC void S_skip_to_be_ignored_text(pTHX_ RExC_state_t *pRExC_state, char ** p, const bool force_to_xmod); +#define PERL_ARGS_ASSERT_SKIP_TO_BE_IGNORED_TEXT \ + assert(pRExC_state); assert(p) PERL_STATIC_INLINE void S_ssc_add_range(pTHX_ regnode_ssc *ssc, UV const start, UV const end); #define PERL_ARGS_ASSERT_SSC_ADD_RANGE \ assert(ssc) |