In a couple of places it does
if (PL_numeric_radix_sv && IN_LC(LC_NUMERIC)) { ... }
But PL_numeric_radix_sv is set to NULL unless we have a non-standard
radix point (i.e. not "."), and this can only happen when we're in the
scope of 'use locale'. So the IN_LC() should be a redundant (and
expensive) test. Replace it with an assert.
#ifndef USE_LOCALE_NUMERIC
*p++ = '.';
#else
- if (PL_numeric_radix_sv && IN_LC(LC_NUMERIC)) {
+ if (PL_numeric_radix_sv) {
STRLEN n;
const char* r = SvPV(PL_numeric_radix_sv, n);
+ assert(IN_LC(LC_NUMERIC));
Copy(r, p, n, char);
p += n;
}
lc_numeric_set = TRUE;
}
- if (PL_numeric_radix_sv && IN_LC(LC_NUMERIC)) {
+ if (PL_numeric_radix_sv) {
+ assert(IN_LC(LC_NUMERIC));
radix_len = SvCUR(PL_numeric_radix_sv);
/* note that this will convert the output to utf8 even if
* if the radix point didn't get output */