This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Special case localeconv when NUMERIC, MONETARY must be C
authorKarl Williamson <khw@cpan.org>
Tue, 12 Dec 2023 12:47:10 +0000 (05:47 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 13 Dec 2023 01:44:36 +0000 (18:44 -0700)
commitbfe165bb00c8ed0aafbf9837f4fcfc23e582f1d8
tree8eb5c73f5d8aa7b43d8c8b299c41e338ad1ac6b0
parent70d86ac890560596579fdfc74b91dfc0ba933074
Special case localeconv when NUMERIC, MONETARY must be C

When both these categories are C, we don't need to call localeconv(),
which can be expensive because it may mean toggling locales.  Instead
the answers are well defined by the C Standard.  This adds a function
that returns those, and #ifdef's to locale.c to compile to use the
special function instead of the more general one if both categories must
be C.

A future commit will extend the use of this new function to more cases.
embed.fnc
embed.h
locale.c
proto.h