diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-01-29 10:11:39 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-01-29 10:26:41 -0700 |
commit | 881ffab65cdbee2f146ada660e5593bad2e71472 (patch) | |
tree | e8ede27d35417eb0e8de6b9039f75a62a9479343 | |
parent | 71556506e314e769ce97e03177d978fbd8a37c18 (diff) | |
download | perl-881ffab65cdbee2f146ada660e5593bad2e71472.tar.gz |
Use embed.pl inline capabilities for regcurly
Change the regcurly definition to use the new inline abilities.
-rw-r--r-- | dquote_static.c | 18 | ||||
-rw-r--r-- | embed.fnc | 3 | ||||
-rw-r--r-- | embed.h | 3 | ||||
-rw-r--r-- | proto.h | 9 |
4 files changed, 21 insertions, 12 deletions
diff --git a/dquote_static.c b/dquote_static.c index fbd8c3824d..532122134e 100644 --- a/dquote_static.c +++ b/dquote_static.c @@ -7,24 +7,18 @@ * It is currently #included by regcomp.c and toke.c. */ +#define PERL_IN_DQUOTE_STATIC_C +#include "proto.h" +#include "embed.h" + /* - regcurly - a little FSA that accepts {\d+,?\d*} Pulled from regcomp.c. */ - -/* embed.pl doesn't yet know how to handle static inline functions, so - manually decorate it here with gcc-style attributes. -*/ -PERL_STATIC_INLINE I32 -regcurly(register const char *s) - __attribute__warn_unused_result__ - __attribute__pure__ - __attribute__nonnull__(1); - PERL_STATIC_INLINE I32 -regcurly(register const char *s) +S_regcurly(register const char *s) { - assert(s); + PERL_ARGS_ASSERT_REGCURLY; if (*s++ != '{') return FALSE; @@ -988,6 +988,9 @@ Ap |char* |re_intuit_start|NN REGEXP * const rx|NULLOK SV* sv|NN char* strpos \ |NN char* strend|const U32 flags \ |NULLOK re_scream_pos_data *data Ap |SV* |re_intuit_string|NN REGEXP *const r +#if defined(PERL_IN_DQUOTE_STATIC_C) +iPR |I32 |regcurly |NN const char *s +#endif Ap |I32 |regexec_flags |NN REGEXP *const rx|NN char *stringarg \ |NN char *strend|NN char *strbeg|I32 minend \ |NN SV *sv|NULLOK void *data|U32 flags @@ -1238,6 +1238,9 @@ #define do_trans_simple(a) S_do_trans_simple(aTHX_ a) #define do_trans_simple_utf8(a) S_do_trans_simple_utf8(aTHX_ a) # endif +# if defined(PERL_IN_DQUOTE_STATIC_C) +#define regcurly(a) S_regcurly(aTHX_ a) +# endif # if defined(PERL_IN_DUMP_C) #define deb_curcv(a) S_deb_curcv(aTHX_ a) #define debprof(a) S_debprof(aTHX_ a) @@ -5179,6 +5179,15 @@ STATIC I32 S_do_trans_simple_utf8(pTHX_ SV * const sv) assert(sv) #endif +#if defined(PERL_IN_DQUOTE_STATIC_C) +PERL_STATIC_INLINE I32 S_regcurly(pTHX_ const char *s) + __attribute__warn_unused_result__ + __attribute__pure__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_REGCURLY \ + assert(s) + +#endif #if defined(PERL_IN_DUMP_C) STATIC CV* S_deb_curcv(pTHX_ const I32 ix); STATIC void S_debprof(pTHX_ const OP *o) |