Properly determine if in locale for NV stringification
authorKarl Williamson <public@khwilliamson.com>
Fri, 28 Jun 2013 21:43:54 +0000 (15:43 -0600)
committerKarl Williamson <public@khwilliamson.com>
Sun, 7 Jul 2013 19:29:44 +0000 (13:29 -0600)
Commit 68e8f474bc686a86c064b695b9c7400313d7af65 used the wrong macro to
determine if the operation is within the scope of 'use locale'.  It also
has to operate under 'use locale 'not_characters'.

Tests for this are coming in the patch for [perl #118197].

sv.c

diff --git a/sv.c b/sv.c
index 0e33556..a42b4a8 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -2928,7 +2928,7 @@ Perl_sv_2pv_flags(pTHX_ SV *const sv, STRLEN *const lp, const I32 flags)
              * change to the C locale during the Gconvert and then change back.
              * But if we're already in the C locale (PL_numeric_standard is
              * TRUE in that case), no need to do any changing */
-            if (PL_numeric_standard || IN_LOCALE_RUNTIME) {
+            if (PL_numeric_standard || IN_SOME_LOCALE_FORM_RUNTIME) {
                 Gconvert(SvNVX(sv), NV_DIG, 0, s);
             }
             else {