diff options
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | dquote.c | 1 | ||||
-rw-r--r-- | dquote_inline.h | 36 | ||||
-rw-r--r-- | embed.fnc | 2 | ||||
-rw-r--r-- | embed.h | 4 | ||||
-rw-r--r-- | inline.h | 30 | ||||
-rw-r--r-- | proto.h | 16 | ||||
-rw-r--r-- | regcomp.c | 1 | ||||
-rw-r--r-- | toke.c | 1 |
9 files changed, 44 insertions, 48 deletions
@@ -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 @@ -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_ */ @@ -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) @@ -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) @@ -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) @@ -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) @@ -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" @@ -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) \ |