Skip to content

Commit

Permalink
locale.c: Rmv special case
Browse files Browse the repository at this point in the history
At this point in the code, we know we are already switched into the
underlying numeric locale; there's no need to further check to see if
switching is necessary.
  • Loading branch information
khwilliamson committed May 6, 2021
1 parent 1e4c699 commit 6bb2352
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions locale.c
Expand Up @@ -1642,10 +1642,8 @@ S_new_numeric(pTHX_ const char *newnum)
const char * scratch_buffer = NULL;

PL_numeric_underlying_is_standard = strEQ(C_decimal_point,
my_langinfo_c(RADIXCHAR, LC_NUMERIC,
USE_UNDERLYING_NUMERIC,
&scratch_buffer, NULL,
NULL));
my_langinfo_c(RADIXCHAR, LC_NUMERIC, NULL,
&scratch_buffer, NULL, NULL));
Safefree(scratch_buffer);

# ifndef TS_W32_BROKEN_LOCALECONV
Expand All @@ -1671,9 +1669,8 @@ S_new_numeric(pTHX_ const char *newnum)
if (PL_numeric_underlying_is_standard) {
PL_numeric_underlying_is_standard = strEQ(C_thousands_sep,
my_langinfo_c(THOUSEP, LC_NUMERIC,
USE_UNDERLYING_NUMERIC,
&scratch_buffer, NULL,
NULL));
NULL, &scratch_buffer,
NULL, NULL));
}
Safefree(scratch_buffer);

Expand Down

0 comments on commit 6bb2352

Please sign in to comment.