summaryrefslogtreecommitdiff
path: root/inline.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-01-16 15:33:44 -0700
committerKarl Williamson <khw@cpan.org>2020-01-23 15:46:56 -0700
commit14fe5f8a20e1e15504b894f3df0861524250bd64 (patch)
tree3e582fa6dfe371ac7a7f7a41e725bcb83b53e3dd /inline.h
parentfcc04d73946f50bda2ffb344bea778338ce39003 (diff)
downloadperl-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.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/inline.h b/inline.h
index 7196849cf6..621857a7fb 100644
--- a/inline.h
+++ b/inline.h
@@ -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)