diff --git a/locale.c b/locale.c index 71c3f52f9d90..3873f9f27968 100644 --- a/locale.c +++ b/locale.c @@ -5348,8 +5348,8 @@ S_my_localeconv(pTHX_ const int item) HV * hv = newHV(); /* The returned hash, initially empty */ sv_2mortal((SV*)hv); - /* The function is used by Perl_localeconv() and POSIX::localeconv(), - * and is thread-safe. + /* The function is used by Perl_localeconv() and POSIX::localeconv(), or + * internally from this file, and is thread-safe. * * localeconv() returns items from two different locale categories, * LC_MONETARY and LC_NUMERIC. Various data structures in this function @@ -5538,10 +5538,8 @@ S_my_localeconv(pTHX_ const int item) * parameter is ignored. */ PERL_UNUSED_ARG(item); -# else - - /* This only gets compiled for the use-case of using localeconv() to - * emulate an nl_langinfo() missing from the platform. */ +# else /* This only gets compiled for the use-case of using localeconv() + to emulate nl_langinfo() when missing from the platform. */ # ifdef USE_LOCALE_NUMERIC @@ -5562,9 +5560,10 @@ S_my_localeconv(pTHX_ const int item) * * Without nl_langinfo(), the call to my_localeconv() could be for all of * the localeconv() items or for just one of the following 3 items to - * emulate nl_langinfo(). This is compiled only when using - * perl_langinfo.h, which we control, and it has been constructed so that - * no item is numbered 0. + * emulate nl_langinfo(). + * + * This is compiled only when using perl_langinfo.h, which we control, and + * it has been constructed so that no item is numbered 0. * * For each individual item, either return the known value if the current * locale is "C", or set up the appropriate parameters for the call below @@ -5636,10 +5635,9 @@ S_my_localeconv(pTHX_ const int item) # endif - { /* Here, the call is for all of localeconv(). It has a bunch of - * items. As in the individual item case, set up the parameters for - * the populate functions */ - + { + /* Here, the call is for all of localeconv(). It has a bunch of + * items. The first function call always gets the MONETARY values */ index_bits = OFFSET_TO_BIT(MONETARY_OFFSET); # ifdef USE_LOCALE_MONETARY @@ -5875,9 +5873,6 @@ S_populate_hash_from_localeconv(pTHX_ HV * hv, PERL_ARGS_ASSERT_POPULATE_HASH_FROM_LOCALECONV; PERL_UNUSED_ARG(which_mask); /* Some configurations don't use this; complicated to figure out which */ -# ifndef USE_LOCALE - PERL_UNUSED_ARG(locale); -# endif /* Run localeconv() and copy some or all of its results to the input 'hv' * hash. Most localeconv() implementations return the values in a global @@ -5995,7 +5990,7 @@ S_populate_hash_from_localeconv(pTHX_ HV * hv, const PERL_UINT_FAST8_T i = lsbit_pos(working_mask); working_mask &= ~ (1 << i); - /* For each field for the given category ... */ + /* For each string field for the given category ... */ const lconv_offset_t * category_strings = strings[i]; while (category_strings->name) {