In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/c8eaeaeca3cef30e45c15e87125a03a0ac0e01f9?hp=9c6b56dc65cdd9256fbe04a7baf4f085db1c04dd>

- Log -----------------------------------------------------------------
commit c8eaeaeca3cef30e45c15e87125a03a0ac0e01f9
Author: David Mitchell <da...@iabyn.com>
Date:   Tue Aug 8 09:53:13 2017 +0100

    Revert "Perl_sv_vcatpvfn_flags: skip IN_LC(LC_NUMERIC)"
    
    This reverts commit c10a72e1914795f6399890aafae13734552645cd.
    
    I thought that if PL_numeric_radix_sv is true, then IN_LC(LC_NUMERIC) must
    be true, so no need to test for both. So I replaced the expensive
    IN_LC(LC_NUMERIC) test with an assert.
    
    But in http://nntp.perl.org/group/perl.perl5.porters/245455, Karl points
    out that  the assert is triggering on HP-UX.
    
    So there's something wrong with my logic something.
    
    So revert.
-----------------------------------------------------------------------

Summary of changes:
 sv.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sv.c b/sv.c
index 087fc73f89..c370f973a3 100644
--- a/sv.c
+++ b/sv.c
@@ -11767,10 +11767,9 @@ S_format_hexfp(pTHX_ char * const buf, const STRLEN 
bufsize, const char c,
 #ifndef USE_LOCALE_NUMERIC
             *p++ = '.';
 #else
-            if (PL_numeric_radix_sv) {
+            if (PL_numeric_radix_sv && IN_LC(LC_NUMERIC)) {
                 STRLEN n;
                 const char* r = SvPV(PL_numeric_radix_sv, n);
-                assert(IN_LC(LC_NUMERIC));
                 Copy(r, p, n, char);
                 p += n;
             }
@@ -12963,8 +12962,7 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char 
*const pat, const STRLEN p
                 lc_numeric_set = TRUE;
             }
 
-            if (PL_numeric_radix_sv) {
-                assert(IN_LC(LC_NUMERIC));
+            if (PL_numeric_radix_sv && IN_LC(LC_NUMERIC)) {
                 /* this can't wrap unless PL_numeric_radix_sv is a string
                  * consuming virtually all the 32-bit or 64-bit address
                  * space

--
Perl5 Master Repository

Reply via email to