develooper Front page | perl.perl5.changes | Postings from March 2018

[perl.git] branch blead updated. v5.27.8-421-gffceb0b88f

From:
Karl Williamson
Date:
March 2, 2018 02:34
Subject:
[perl.git] branch blead updated. v5.27.8-421-gffceb0b88f
Message ID:
E1eraWB-0007yv-Fb@git.dc.perl.space
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/ffceb0b88fd1be4a700ff14e5c9b6bd2bfe02802?hp=b2f82b52000c3bfe6e6df200c775e2a639d91552>

- Log -----------------------------------------------------------------
commit ffceb0b88fd1be4a700ff14e5c9b6bd2bfe02802
Author: Karl Williamson <khw@cpan.org>
Date:   Thu Mar 1 19:30:42 2018 -0700

    perl.h: Add comment about clang warnings
    
    Commit b2f82b52000c3bfe6e6df200c775e2a639d91552 failed to document
    details about the clang warnings.  This commit adds a link to clang's
    documentation

commit 49cd072660b3b1858be5f27df107b3b42498a3f3
Author: Karl Williamson <khw@cpan.org>
Date:   Thu Mar 1 19:11:43 2018 -0700

    Remove parameter from isSCRIPT_RUN
    
    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.

-----------------------------------------------------------------------

Summary of changes:
 embed.fnc          | 3 +--
 embed.h            | 2 +-
 ext/POSIX/POSIX.xs | 3 +--
 perl.h             | 6 +++++-
 proto.h            | 2 +-
 regexec.c          | 7 +++++--
 6 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/embed.fnc b/embed.fnc
index 63a654bf50..f5af7ee0d9 100644
--- 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 f964e99245..24f1c17c71 100644
--- a/embed.h
+++ b/embed.h
@@ -999,7 +999,7 @@
 #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)
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index f54ca26dfa..764600c899 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -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/perl.h b/perl.h
index d20fdd0f75..deafa0f5f3 100644
--- a/perl.h
+++ b/perl.h
@@ -5588,7 +5588,11 @@ typedef struct am_table_short AMTS;
  *
  * The single argument is a condition to test for, and if true, to panic, as
  * this would be an attempt to complement the LC_NUMERIC state, and we're not
- * supposed to because it's locked */
+ * supposed to because it's locked.
+ *
+ * Clang improperly gives warnings for this, if not silenced:
+ * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#conditional-locks
+ * */
 #    define LC_NUMERIC_LOCK(cond_to_panic_if_already_locked)                \
         CLANG_DIAG_IGNORE(-Wthread-safety)	     	                    \
         STMT_START {                                                        \
diff --git a/proto.h b/proto.h
index 34da7987fa..1e35432c46 100644
--- 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)
diff --git a/regexec.c b/regexec.c
index 750ddb5997..488bbd8386 100644
--- 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;

-- 
Perl5 Master Repository



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About