diff options
author | Karl Williamson <khw@cpan.org> | 2022-09-29 09:49:40 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-10-18 06:22:16 -0600 |
commit | 7af2d2037375d58e700f9e1b217efb2c4db66133 (patch) | |
tree | 4bb201f69d074041c49857b13164913ea88b119c | |
parent | 49825ce8d49ec49e0c08ecb341ea5a7b7383225b (diff) | |
download | perl-7af2d2037375d58e700f9e1b217efb2c4db66133.tar.gz |
locale.c: Do uselocale() earlier in init process
This prevents some unnecessary steps, that the next commit would turn
into memory leaks.
-rw-r--r-- | locale.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4790,6 +4790,11 @@ Perl_init_i18nl10n(pTHX_ int printwarn) DEBUG_Lv(PerlIO_printf(Perl_debug_log, "created C object %p\n", PL_C_locale_obj)); + /* Switch to using the POSIX 2008 interface now. This would happen below + * anyway, but deferring it can lead to leaks of memory that would also get + * malloc'd in the interim */ + uselocale(PL_C_locale_obj); + # ifdef USE_LOCALE_NUMERIC PL_underlying_numeric_obj = duplocale(PL_C_locale_obj); |