make Perl_reg_set_capture_string static
authorDavid Mitchell <davem@iabyn.com>
Tue, 18 Jun 2013 15:34:43 +0000 (16:34 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sun, 28 Jul 2013 09:33:35 +0000 (10:33 +0100)
This function was introduced a few commits ago. Since it's now only
called from within regexec.c, make it static.

embed.fnc
embed.h
proto.h
regexec.c

index db058bb..a85b8a6 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1127,14 +1127,6 @@ 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
 ApR    |regnode*|regnext       |NULLOK regnode* p
-
-Exp    |void|reg_set_capture_string|NN REGEXP * const rx \
-                               |NN char *strbeg \
-                               |NN char *strend \
-                               |NN SV *sv \
-                               |U32 flags \
-                               |bool utf8_target
-
 EXp |SV*|reg_named_buff          |NN REGEXP * const rx|NULLOK SV * const key \
                                  |NULLOK SV * const value|const U32 flags
 EXp |SV*|reg_named_buff_iter     |NN REGEXP * const rx|NULLOK const SV * const lastkey \
diff --git a/embed.h b/embed.h
index a280c86..d755269 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define reg_numbered_buff_length(a,b,c)        Perl_reg_numbered_buff_length(aTHX_ a,b,c)
 #define reg_numbered_buff_store(a,b,c) Perl_reg_numbered_buff_store(aTHX_ a,b,c)
 #define reg_qr_package(a)      Perl_reg_qr_package(aTHX_ a)
-#define reg_set_capture_string(a,b,c,d,e,f)    Perl_reg_set_capture_string(aTHX_ a,b,c,d,e,f)
 #define reg_temp_copy(a,b)     Perl_reg_temp_copy(aTHX_ a,b)
 #define regprop(a,b,c)         Perl_regprop(aTHX_ a,b,c)
 #define report_uninit(a)       Perl_report_uninit(aTHX_ a)
diff --git a/proto.h b/proto.h
index 630de14..15ec073 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -3394,14 +3394,6 @@ PERL_CALLCONV SV*        Perl_reg_qr_package(pTHX_ REGEXP * const rx)
 #define PERL_ARGS_ASSERT_REG_QR_PACKAGE        \
        assert(rx)
 
-PERL_CALLCONV void     Perl_reg_set_capture_string(pTHX_ REGEXP * const rx, char *strbeg, char *strend, SV *sv, U32 flags, bool utf8_target)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3)
-                       __attribute__nonnull__(pTHX_4);
-#define PERL_ARGS_ASSERT_REG_SET_CAPTURE_STRING        \
-       assert(rx); assert(strbeg); assert(strend); assert(sv)
-
 PERL_CALLCONV REGEXP*  Perl_reg_temp_copy(pTHX_ REGEXP* ret_x, REGEXP* rx)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_REG_TEMP_COPY \
index 5a06f3b..376a4a9 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -2053,8 +2053,8 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s,
 /* set RX_SAVED_COPY, RX_SUBBEG etc.
  * flags have same meanings as with regexec_flags() */
 
-void
-Perl_reg_set_capture_string(pTHX_ REGEXP * const rx,
+static void
+S_reg_set_capture_string(pTHX_ REGEXP * const rx,
                             char *strbeg,
                             char *strend,
                             SV *sv,
@@ -2063,8 +2063,6 @@ Perl_reg_set_capture_string(pTHX_ REGEXP * const rx,
 {
     struct regexp *const prog = ReANY(rx);
 
-    PERL_ARGS_ASSERT_REG_SET_CAPTURE_STRING;
-
     if (flags & REXEC_COPY_STR) {
 #ifdef PERL_ANY_COW
         if (SvCANCOW(sv)) {
@@ -2252,7 +2250,7 @@ Perl_regexec_flags(pTHX_ REGEXP * const rx, char *stringarg, char *strend,
             prog->lastparen = prog->lastcloseparen = 0;
             RX_MATCH_UTF8_set(rx, utf8_target);
             if ( !(flags & REXEC_NOT_FIRST) )
-                Perl_reg_set_capture_string(aTHX_ rx,
+                S_reg_set_capture_string(aTHX_ rx,
                                         strbeg, strend,
                                         sv, flags, utf8_target);
 
@@ -2846,7 +2844,7 @@ got_it:
 
     /* make sure $`, $&, $', and $digit will work later */
     if ( !(flags & REXEC_NOT_FIRST) )
-        Perl_reg_set_capture_string(aTHX_ rx,
+        S_reg_set_capture_string(aTHX_ rx,
                                     strbeg, reginfo->strend,
                                     sv, flags, utf8_target);