This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove parameter from isSCRIPT_RUN
authorKarl Williamson <khw@cpan.org>
Fri, 2 Mar 2018 02:11:43 +0000 (19:11 -0700)
committerKarl Williamson <khw@cpan.org>
Fri, 2 Mar 2018 02:33:51 +0000 (19:33 -0700)
Daniel Dragan pointed out that this parameter is unused (the commits
that want it didn't get into 5.28), and is causing a table to be
duplicated all over the place, so just remove it for now.

embed.fnc
embed.h
ext/POSIX/POSIX.xs
proto.h
regexec.c

index 63a654b..f5af7ee 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -899,8 +899,7 @@ AMpR        |bool   |_is_utf8_mark  |NN const U8 *p
 ADMpR  |bool   |is_utf8_mark   |NN const U8 *p
 #if defined(PERL_CORE) || defined(PERL_EXT)
 EXdpR  |bool   |isSCRIPT_RUN   |NN const U8 *s|NN const U8 *send   \
-                               |const bool utf8_target             \
-                               |NULLOK SCX_enum * ret_script
+                               |const bool utf8_target
 #endif
 : Used in perly.y
 p      |OP*    |jmaybe         |NN OP *o
diff --git a/embed.h b/embed.h
index f964e99..24f1c17 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define sv_or_pv_pos_u2b(a,b,c,d)      S_sv_or_pv_pos_u2b(aTHX_ a,b,c,d)
 #  endif
 #  if defined(PERL_CORE) || defined(PERL_EXT)
-#define isSCRIPT_RUN(a,b,c,d)  Perl_isSCRIPT_RUN(aTHX_ a,b,c,d)
+#define isSCRIPT_RUN(a,b,c)    Perl_isSCRIPT_RUN(aTHX_ a,b,c)
 #define variant_under_utf8_count       S_variant_under_utf8_count
 #  endif
 #  if defined(PERL_IN_REGCOMP_C)
index f54ca26..764600c 100644 (file)
@@ -3630,8 +3630,7 @@ strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
            under UTF-8, which gives us an extra measure of confidence. */
 
                         && isSCRIPT_RUN((const U8 *) buf, buf + len,
-                                        TRUE, /* Means assume UTF-8 */
-                                        NULL)
+                                        TRUE) /* Means assume UTF-8 */
 #endif
                 )) {
                    SvUTF8_on(sv);
diff --git a/proto.h b/proto.h
index 34da798..1e35432 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -4385,7 +4385,7 @@ PERL_STATIC_INLINE STRLEN S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLE
 #endif
 #endif
 #if defined(PERL_CORE) || defined(PERL_EXT)
-PERL_CALLCONV bool     Perl_isSCRIPT_RUN(pTHX_ const U8 *s, const U8 *send, const bool utf8_target, SCX_enum * ret_script)
+PERL_CALLCONV bool     Perl_isSCRIPT_RUN(pTHX_ const U8 *s, const U8 *send, const bool utf8_target)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_ISSCRIPT_RUN  \
        assert(s); assert(send)
index 750ddb5..488bbd8 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -7691,7 +7691,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
 
         case SRCLOSE:  /*  (*SCRIPT_RUN: ... )   */
 
-            if (! isSCRIPT_RUN(script_run_begin, (U8 *) locinput, utf8_target, NULL))
+            if (! isSCRIPT_RUN(script_run_begin, (U8 *) locinput, utf8_target))
             {
                 sayNO;
             }
@@ -10388,7 +10388,7 @@ it are from the Inherited or Common scripts.
 */
 
 bool
-Perl_isSCRIPT_RUN(pTHX_ const U8 * s, const U8 * send, const bool utf8_target, SCX_enum * ret_script)
+Perl_isSCRIPT_RUN(pTHX_ const U8 * s, const U8 * send, const bool utf8_target)
 {
     /* Basically, it looks at each character in the sequence to see if the
      * above conditions are met; if not it fails.  It uses an inversion map to
@@ -10438,6 +10438,9 @@ Perl_isSCRIPT_RUN(pTHX_ const U8 * s, const U8 * send, const bool utf8_target, S
 
     bool retval = TRUE;
 
+    /* This is supposed to be a return parameter, but currently unused */
+    SCX_enum * ret_script = NULL;
+
     assert(send >= s);
 
     PERL_ARGS_ASSERT_ISSCRIPT_RUN;