diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-12-31 11:54:44 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-01-11 11:50:35 -0700 |
commit | 6b976e32dcccdff3dde7682ad9314dc5cd918e17 (patch) | |
tree | 4c44eacac564ebc264ea2e25bdec5a0c29d8e9d6 /proto.h | |
parent | 3c6cc85ea284b6b479dc5c19e0ca344a5e1103dc (diff) | |
download | perl-6b976e32dcccdff3dde7682ad9314dc5cd918e17.tar.gz |
regcomp.c: Use a parameter to simplify some code
When parsing \p{} outside of a bracketed character class, code in
regcomp.c has pretended it is a bracketed character class by changing
and restoring the parsing pointers, and then calling the charclass
handler. This code can be simplified by instead passing a flag to the
handler meaning to just parse one item. The faking is simpler there,
with no restoring necessary. Also we can eliminate the duplicate
handling of special cases.
Future commits will make more extensive use of this mechanism.
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -6639,7 +6639,7 @@ STATIC regnode* S_regbranch(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, #define PERL_ARGS_ASSERT_REGBRANCH \ assert(pRExC_state); assert(flagp) -STATIC regnode* S_regclass(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth) +STATIC regnode* S_regclass(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth, const bool stop_at_1) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_REGCLASS \ |