Skip to content

Commit

Permalink
S_querylocale_2008_i: Add entry assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed Nov 22, 2023
1 parent 261850f commit 83e5d6a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions locale.c
Original file line number Diff line number Diff line change
Expand Up @@ -2038,6 +2038,10 @@ S_querylocale_2008_i(pTHX_ const locale_category_index index,
const locale_t cur_obj = uselocale((locale_t) 0);
const char * retval;

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

DEBUG_Lv(PerlIO_printf(Perl_debug_log, "querylocale_2008_i(%s) on %p;"
" called from %" LINE_Tf "\n",
category_names[index], cur_obj,
Expand Down

0 comments on commit 83e5d6a

Please sign in to comment.