This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
grok_numeric_radix(): Avoid recalculating
authorKarl Williamson <khw@cpan.org>
Wed, 17 Jan 2018 20:18:50 +0000 (13:18 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 31 Jan 2018 05:49:03 +0000 (22:49 -0700)
This function just determined that we are in the scope of 'use locale',
hence the underlying radix character should be used.  This commit
changes to use the macro that directly does that; previously the macro
that redundantly looks at if we are in the scope was used.

numeric.c

index 50c85a4..ea500e9 100644 (file)
--- a/numeric.c
+++ b/numeric.c
@@ -523,7 +523,7 @@ Perl_grok_numeric_radix(pTHX_ const char **sp, const char *send)
 
     if (IN_LC(LC_NUMERIC)) {
         DECLARATION_FOR_LC_NUMERIC_MANIPULATION;
-        STORE_LC_NUMERIC_SET_TO_NEEDED();
+        STORE_LC_NUMERIC_FORCE_TO_UNDERLYING();
         if (PL_numeric_radix_sv) {
             STRLEN len;
             const char * const radix = SvPV(PL_numeric_radix_sv, len);