Skip to content

Commit

Permalink
locale.c: Move some code to a bit later
Browse files Browse the repository at this point in the history
This is in preparation for a future commit to make the critical section
this comes after a bit larger, so move it to after what will be the new
critical section.
  • Loading branch information
khwilliamson committed Feb 2, 2023
1 parent 2dd6cd3 commit a675656
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions locale.c
Expand Up @@ -4303,18 +4303,18 @@ S_my_langinfo_i(pTHX_
retval = save_to_buffer(nl_langinfo(item), retbufp, retbuf_sizep);
gwLOCALE_UNLOCK;

if (utf8ness) {
*utf8ness = get_locale_string_utf8ness_i(retval,
LOCALE_UTF8NESS_UNKNOWN,
locale, cat_index);
}

restore_toggled_locale_i(cat_index, orig_switched_locale);

# ifdef USE_LOCALE_CTYPE
restore_toggled_locale_c(LC_CTYPE, orig_CTYPE_locale);
# endif

if (utf8ness) {
*utf8ness = get_locale_string_utf8ness_i(retval,
LOCALE_UTF8NESS_UNKNOWN,
locale, cat_index);
}

return retval;
/*--------------------------------------------------------------------------*/
# else /* Below, emulate nl_langinfo as best we can */
Expand Down

0 comments on commit a675656

Please sign in to comment.