diff options
author | Karl Williamson <khw@cpan.org> | 2020-01-16 15:33:44 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-01-23 15:46:56 -0700 |
commit | 14fe5f8a20e1e15504b894f3df0861524250bd64 (patch) | |
tree | 3e582fa6dfe371ac7a7f7a41e725bcb83b53e3dd /inline.h | |
parent | fcc04d73946f50bda2ffb344bea778338ce39003 (diff) | |
download | perl-14fe5f8a20e1e15504b894f3df0861524250bd64.tar.gz |
Remove dquote_inline.h
The remaining function in this file is moved to inline.h, just to not
have an extra file lying around with hardly anything in it.
Diffstat (limited to 'inline.h')
-rw-r--r-- | inline.h | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -1979,6 +1979,36 @@ S_lossless_NV_to_IV(const NV nv, IV *ivp) #endif +/* ------------------ regcomp.c, toke.c ------------ */ + +#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C) + +/* + - regcurly - a little FSA that accepts {\d+,?\d*} + Pulled from reg.c. + */ +PERL_STATIC_INLINE I32 +S_regcurly(const char *s) +{ + PERL_ARGS_ASSERT_REGCURLY; + + if (*s++ != '{') + return FALSE; + if (!isDIGIT(*s)) + return FALSE; + while (isDIGIT(*s)) + s++; + if (*s == ',') { + s++; + while (isDIGIT(*s)) + s++; + } + + return *s == '}'; +} + +#endif + /* ------------------ pp.c, regcomp.c, toke.c, universal.c ------------ */ #if defined(PERL_IN_PP_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_UNIVERSAL_C) |