Skip to content

Commit

Permalink
XXX locale.c: Kludge because C obj getting destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed Apr 29, 2021
1 parent 99a9bc2 commit 97499b8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions locale.c
Expand Up @@ -1235,6 +1235,15 @@ S_emulate_setlocale_i(pTHX_
/* Ready to create a new locale by modification of the exising one */
new_obj = newlocale(mask, new_locale, old_obj);

# ifndef USE_PL_CURLOCALES
if (strNE(calculate_LC_ALL(PL_C_locale_obj), "C")) {
DEBUG_L(PerlIO_printf(Perl_debug_log, "%d: C==%s\n", __LINE__, calculate_LC_ALL(PL_C_locale_obj)));
freelocale(PL_C_locale_obj);
PL_C_locale_obj = newlocale(LC_ALL_MASK, "C", (locale_t) 0);
}
#endif


if (! new_obj) {
DEBUG_L(PerlIO_printf(Perl_debug_log,
"(%d): emulate_setlocale_i creating new object"
Expand Down

0 comments on commit 97499b8

Please sign in to comment.