Skip to content

Commit

Permalink
Revert "define numeric values to be C when no USE_NUMERIC"
Browse files Browse the repository at this point in the history
This reverts commit 9bb7ff6531bf9e28d635a71e6d55c752a995da2d.
  • Loading branch information
khwilliamson committed Nov 22, 2023
1 parent d79d8ad commit 0cd795d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
6 changes: 0 additions & 6 deletions locale.c
Expand Up @@ -7837,12 +7837,6 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
PL_underlying_radix_sv = newSV(1);
Newxz(PL_numeric_name, 1, char); /* Single NUL character */

# else

PL_numeric_radix_sv = newSVpv(C_decimal_point, 0);
PL_underlying_radix_sv = newSVpv(C_decimal_point, 0);
NewCopy("C", PL_numeric_name, 2, char);

# endif
# ifdef USE_LOCALE_COLLATE

Expand Down
2 changes: 2 additions & 0 deletions perl.c
Expand Up @@ -1165,12 +1165,14 @@ perl_destruct(pTHXx)
PL_scratch_locale_obj = NULL;
}
#endif
#ifdef USE_LOCALE_NUMERIC
Safefree(PL_numeric_name);
PL_numeric_name = NULL;
SvREFCNT_dec(PL_numeric_radix_sv);
PL_numeric_radix_sv = NULL;
SvREFCNT_dec(PL_underlying_radix_sv);
PL_underlying_radix_sv = NULL;
#endif
#ifdef USE_LOCALE_CTYPE
Safefree(PL_ctype_name);
PL_ctype_name = NULL;
Expand Down
1 change: 0 additions & 1 deletion sv.c
Expand Up @@ -16094,7 +16094,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
#endif

#ifdef USE_LOCALE_NUMERIC
// SAVEPV?
PL_numeric_name = SAVEPV("C");
PL_numeric_radix_sv = newSVpvs(".");
PL_underlying_radix_sv = newSVpvs(".");
Expand Down

0 comments on commit 0cd795d

Please sign in to comment.