diff options
author | David Mitchell <davem@iabyn.com> | 2017-08-08 09:53:13 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-08-08 09:53:13 +0100 |
commit | c8eaeaeca3cef30e45c15e87125a03a0ac0e01f9 (patch) | |
tree | b90091f9d53df539e450264fe6198da413d20723 /sv.c | |
parent | 9c6b56dc65cdd9256fbe04a7baf4f085db1c04dd (diff) | |
download | perl-c8eaeaeca3cef30e45c15e87125a03a0ac0e01f9.tar.gz |
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.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 |