This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove dquote_inline.h
authorKarl Williamson <khw@cpan.org>
Thu, 16 Jan 2020 22:33:44 +0000 (15:33 -0700)
committerKarl Williamson <khw@cpan.org>
Thu, 23 Jan 2020 22:46:56 +0000 (15:46 -0700)
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.

MANIFEST
dquote.c
dquote_inline.h [deleted file]
embed.fnc
embed.h
inline.h
proto.h
regcomp.c
toke.c

index 0f69fd7..d47ba57 100644 (file)
--- 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
index c032198..dcbd8c9 100644 (file)
--- 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 (file)
index 59612ac..0000000
+++ /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_ */
index a4079b7..20903cf 100644 (file)
--- 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 9b3f0ce..82499a2 100644 (file)
--- a/embed.h
+++ b/embed.h
 #  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)
index 7196849..621857a 100644 (file)
--- 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 bc939fd..2b14428 100644 (file)
--- 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)
index 118e40f..ca876d5 100644 (file)
--- 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 d407268..abdd36d 100644 (file)
--- 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) \