summaryrefslogtreecommitdiff
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
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.
-rw-r--r--MANIFEST1
-rw-r--r--dquote.c1
-rw-r--r--dquote_inline.h36
-rw-r--r--embed.fnc2
-rw-r--r--embed.h4
-rw-r--r--inline.h30
-rw-r--r--proto.h16
-rw-r--r--regcomp.c1
-rw-r--r--toke.c1
9 files changed, 44 insertions, 48 deletions
diff --git a/MANIFEST b/MANIFEST
index 0f69fd7467..d47ba578f9 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -4059,7 +4059,6 @@ doio.c I/O operations
doop.c Support code for various operations
dosish.h Some defines for MS/DOSish machines
dquote.c Functions for double quotish contexts
-dquote_inline.h Inline functions for double quotish contexts
dump.c Debugging output
ebcdic_tables.h Generated tables included in utfebcdic.h
embed.fnc Database used by embed.pl
diff --git a/dquote.c b/dquote.c
index c032198529..dcbd8c93ac 100644
--- a/dquote.c
+++ b/dquote.c
@@ -8,7 +8,6 @@
#include "EXTERN.h"
#define PERL_IN_DQUOTE_C
#include "perl.h"
-#include "dquote_inline.h"
/* XXX Add documentation after final interface and behavior is decided */
diff --git a/dquote_inline.h b/dquote_inline.h
deleted file mode 100644
index 59612ac7d8..0000000000
--- a/dquote_inline.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* dquote_inline.h
- *
- * Copyright (C) 2015 by Larry Wall and others
- *
- * You may distribute under the terms of either the GNU General Public
- * License or the Artistic License, as specified in the README file.
- */
-
-#ifndef PERL_DQUOTE_INLINE_H_ /* Guard against nested #inclusion */
-#define PERL_DQUOTE_INLINE_H_
-
-/*
- - 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 /* PERL_DQUOTE_INLINE_H_ */
diff --git a/embed.fnc b/embed.fnc
index a4079b7e01..20903cfd03 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1162,6 +1162,8 @@ EpRX |const char *|form_alien_digit_msg|const U8 which \
|NN const char * const send \
|const bool UTF \
|const bool braced
+#endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
EiRT |I32 |regcurly |NN const char *s
#endif
#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_DQUOTE_C)
diff --git a/embed.h b/embed.h
index 9b3f0ce569..82499a22dc 100644
--- a/embed.h
+++ b/embed.h
@@ -1107,13 +1107,15 @@
# if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_SV_C)
#define invlist_clone(a,b) Perl_invlist_clone(aTHX_ a,b)
# endif
+# if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
+#define regcurly S_regcurly
+# endif
# if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_DQUOTE_C)
#define form_alien_digit_msg(a,b,c,d,e,f) Perl_form_alien_digit_msg(aTHX_ a,b,c,d,e,f)
#define form_cp_too_large_msg(a,b,c,d) Perl_form_cp_too_large_msg(aTHX_ a,b,c,d)
#define grok_bslash_c(a,b,c,d) Perl_grok_bslash_c(aTHX_ a,b,c,d)
#define grok_bslash_o(a,b,c,d,e,f,g,h) Perl_grok_bslash_o(aTHX_ a,b,c,d,e,f,g,h)
#define grok_bslash_x(a,b,c,d,e,f,g,h) Perl_grok_bslash_x(aTHX_ a,b,c,d,e,f,g,h)
-#define regcurly S_regcurly
# endif
# if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_OP_C) || defined(PERL_IN_DOOP_C)
#define _add_range_to_invlist(a,b,c) Perl__add_range_to_invlist(aTHX_ a,b,c)
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)
diff --git a/proto.h b/proto.h
index bc939fdf9d..2b14428c3c 100644
--- a/proto.h
+++ b/proto.h
@@ -5904,6 +5904,15 @@ PERL_CALLCONV SV* Perl_invlist_clone(pTHX_ SV* const invlist, SV* newlist);
#define PERL_ARGS_ASSERT_INVLIST_CLONE \
assert(invlist)
#endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE I32 S_regcurly(const char *s)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_REGCURLY \
+ assert(s)
+#endif
+
+#endif
#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_DQUOTE_C)
PERL_CALLCONV const char * Perl_form_alien_digit_msg(pTHX_ const U8 which, const STRLEN valids_len, const char * const first_bad, const char * const send, const bool UTF, const bool braced)
__attribute__warn_unused_result__;
@@ -5929,13 +5938,6 @@ PERL_CALLCONV bool Perl_grok_bslash_x(pTHX_ char** s, const char* const send, UV
#define PERL_ARGS_ASSERT_GROK_BSLASH_X \
assert(s); assert(send); assert(uv); assert(message)
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE I32 S_regcurly(const char *s)
- __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_REGCURLY \
- assert(s)
-#endif
-
#endif
#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_OP_C) || defined(PERL_IN_DOOP_C)
PERL_CALLCONV SV* Perl__add_range_to_invlist(pTHX_ SV* invlist, UV start, UV end)
diff --git a/regcomp.c b/regcomp.c
index 118e40faf9..ca876d545a 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -82,7 +82,6 @@ EXTERN_C const struct regexp_engine my_reg_engine;
# include "regcomp.h"
#endif
-#include "dquote_inline.h"
#include "invlist_inline.h"
#include "unicode_constants.h"
diff --git a/toke.c b/toke.c
index d4072682c8..abdd36d67f 100644
--- a/toke.c
+++ b/toke.c
@@ -38,7 +38,6 @@ Individual members of C<PL_parser> have their own documentation.
#include "EXTERN.h"
#define PERL_IN_TOKE_C
#include "perl.h"
-#include "dquote_inline.h"
#include "invlist_inline.h"
#define new_constant(a,b,c,d,e,f,g, h) \