Skip to content

Commit

Permalink
S_bool_setlocale_i: Add entry assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed Nov 20, 2023
1 parent c12d2ab commit d2f6db5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions locale.c
Expand Up @@ -2244,6 +2244,11 @@ S_bool_setlocale_2008_i(pTHX_

int mask = category_masks[index];
const locale_t entry_obj = uselocale((locale_t) 0);

# ifdef MULTIPLICITY
assert(entry_obj== LC_GLOBAL_LOCALE || entry_obj == PL_cur_locale_obj);
# endif

const char * locale_on_entry = querylocale_i(index);

DEBUG_Lv(PerlIO_printf(Perl_debug_log,
Expand Down

0 comments on commit d2f6db5

Please sign in to comment.