Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: 1f0b5ce394125f8dcb760f1ba0a4f02677a31182 https://github.com/Perl/perl5/commit/1f0b5ce394125f8dcb760f1ba0a4f02677a31182 Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023)
Changed paths: M embed.fnc M locale.c M proto.h Log Message: ----------- Change parameter name for S_bool_setlocale_2008_i THe new name is more descriptive Commit: c60fcda5df471ac234cad474f6c3b9b9bd821df5 https://github.com/Perl/perl5/commit/c60fcda5df471ac234cad474f6c3b9b9bd821df5 Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M locale.c Log Message: ----------- S_bool_setlocale_2008_i: Improve debug statements Commit: 518014b948e866bdfa8a8581222b0cc0959b157c https://github.com/Perl/perl5/commit/518014b948e866bdfa8a8581222b0cc0959b157c Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M locale.c Log Message: ----------- S_bool_setlocale_2008_i: Check for failure return Previously, this would forge ahead; looking at the code it seems it would fail later on anyway, but it is best to check and fail immediately. Commit: dd3298e66284688d228a8dfc55803f0ebc4329f7 https://github.com/Perl/perl5/commit/dd3298e66284688d228a8dfc55803f0ebc4329f7 Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M locale.c Log Message: ----------- S_bool_setlocale_2008_i: Separate out failure code This causes the failure to be handled by going to effectively a tail-call spot. This is in preparation for it being used in another place. Commit: d9a64450d337636c6c286208cc291d1b303d839b https://github.com/Perl/perl5/commit/d9a64450d337636c6c286208cc291d1b303d839b Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move declaration closer to first use Commit: 161f7824fefd836320126654fc16b36404b82a3b https://github.com/Perl/perl5/commit/161f7824fefd836320126654fc16b36404b82a3b Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Extract two debug statements into macros This is in preparation for them being called from other places Commit: fbe9c976c9e183d57d286f9d3289375d0df641f6 https://github.com/Perl/perl5/commit/fbe9c976c9e183d57d286f9d3289375d0df641f6 Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Indent/outdent some lines This is to make the differences in the next commit smaller Commit: 6d827e798c0847b9b87f877624469ae6dd8dd2e3 https://github.com/Perl/perl5/commit/6d827e798c0847b9b87f877624469ae6dd8dd2e3 Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Rmv obsolete code A "" input locale has been expanded by the time it gets here, so this is never true; it is a relict from previous implementations. This also fixes preprocessor indentation adjacent to the revised code Commit: 4b2eac63494c49fa113068bdbd0d27f4630d2024 https://github.com/Perl/perl5/commit/4b2eac63494c49fa113068bdbd0d27f4630d2024 Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M locale.c Log Message: ----------- S_bool_setlocale_2008_i: Copy function call. This removes a function call from a single place and inserts it in several. The reason is that it makes a future commit cleaner. Commit: a5bbeb7a0ea2c38bb6df7b486c50596103c68187 https://github.com/Perl/perl5/commit/a5bbeb7a0ea2c38bb6df7b486c50596103c68187 Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- S_update_PL_curlocales(): Add parameter This is the ultimate caller's line number, which will be useful in a future commit; unused for now. Commit: 3e27424bcf170269c4299f9a429aedf3010184da https://github.com/Perl/perl5/commit/3e27424bcf170269c4299f9a429aedf3010184da Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Avoid an (unlikely) leak As the comments say, this eventuality is unlikely to happen, but if it did, it would mean a leak. Commit: 9976f55464c78f9ab02f60b55d496c26bf6af463 https://github.com/Perl/perl5/commit/9976f55464c78f9ab02f60b55d496c26bf6af463 Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Create is_disparate_LC_ALL() This macro uses the results of the new Configure probe that tells us how the platform represents disparate LC_ALL strings. Commit: 5738ee1589ed8d21861e2d5b430cb606ab7e0b35 https://github.com/Perl/perl5/commit/5738ee1589ed8d21861e2d5b430cb606ab7e0b35 Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M locale.c Log Message: ----------- S_bool_setlocale_2008_i: Remove recursion This converts recursive calls of this function into an iterative loop. Besides the obvious benefits, some platforms don't even require a loop, as a future commit will do. Commit: 60153f2a50a5b4d2aeac7849410961ed61073a29 https://github.com/Perl/perl5/commit/60153f2a50a5b4d2aeac7849410961ed61073a29 Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- Add parameter to S_parse_LC_ALL_string This will be used in a future commit to panic when the parsing fails, instead of returning an error. This will be used only when the expectation is strong that the string being parsed is legal, and makes exceptions to that be caught without having to add recovery code to all the calls of this function. Commit: 9a1c5d8e257df22019dd57c31f8fc6b47c15e5ae https://github.com/Perl/perl5/commit/9a1c5d8e257df22019dd57c31f8fc6b47c15e5ae Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- Rmv unused function: S_setlocale_from_aggregate_LC_ALL Previous commits have removed all uses of this Commit: 264e9e116375bc60485f1d38a89cba083abb5307 https://github.com/Perl/perl5/commit/264e9e116375bc60485f1d38a89cba083abb5307 Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M embed.fnc M embed.h M locale.c M perl.h M proto.h Log Message: ----------- S_parse_LC_ALL_string: Squash if categories are same locale It turns out that some platforms return something like C/C/C/C/C/C instead of just the equivalent 'C' when querying LC_ALL. This can lead to extra work for us, and unnecessary noise when displayed to the user. This commit changes parse_LC_ALL_string() to look for this case, and to coalesce the result to just the single value, which is returned in just the 0th element of the input array, leaving the other elements unused. It makes this behavior overridable by an input flag, which will be used in a future commit. Commit: ab7b8ce8a969fda4c8def43d70aeb6049c4f3dbe https://github.com/Perl/perl5/commit/ab7b8ce8a969fda4c8def43d70aeb6049c4f3dbe Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M locale.c Log Message: ----------- S_update_PL_curlocales(): accept arbitrary LC_ALL string Prior to this commit, this function couldn't handle an LC_ALL string that wasn't just a single locale for all categories. But now that we can parse a disparate string, update this function to use that. Commit: f251ad14f11ddf104125b277c0237fbaad37c286 https://github.com/Perl/perl5/commit/f251ad14f11ddf104125b277c0237fbaad37c286 Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M locale.c Log Message: ----------- S_setlocale_2008_i(): Use single newlocale() if available On some platforms the newlocale() libc function when setting LC_ALL can handle an input locale that sets some categories to one thing; and others to another; etc. On such platforms, we don't have to loop through all categories individually. This commit changes to use that if the #define indicating its availability is set. Commit: 1541c823a069c32dd70b7ce6a70c61b96fad20c7 https://github.com/Perl/perl5/commit/1541c823a069c32dd70b7ce6a70c61b96fad20c7 Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M locale.c Log Message: ----------- First guess when newlocale() handles disparate LC_ALL This works so far, but field feed back is needed. Commit: a67bd85b3a75060213043b4e663b97272ec33f8a https://github.com/Perl/perl5/commit/a67bd85b3a75060213043b4e663b97272ec33f8a Author: Karl Williamson <k...@cpan.org> Date: 2023-08-09 (Wed, 09 Aug 2023) Changed paths: M embed.fnc M embed.h M locale.c M perl.h M proto.h Log Message: ----------- Merge branch 'Revamp S_bool_setlocale_2008_i' into blead This series makes several improvements to this function. The most important is that it no longer recursively calls itself. It turns out that some platforms implement newlocale() in such a way that it can take an LC_ALL string where not all categories are the same, just as setlocale() does. Other platforms do not allow this. On platforms that do, a single call to newlocale() can be used instead of one per category. The former recursive call method necessarily entailed one per category. Now, a loop is used to accomplish the same thing on platforms where a single call isn't sufficient. One commit in this series guesses as to which platforms do have the disparate LC_ALL capability, namely those that use the name=value notation in setlocale(). I haven't run across any for which this isn't true, and at this point in the development cycle, I think it's ok to try it this way. A Configure probe could be written if necessary Compare: https://github.com/Perl/perl5/compare/bcf43b1e2b63...a67bd85b3a75