perl.h: Revise a locale setting macro
authorKarl Williamson <public@khwilliamson.com>
Thu, 12 Dec 2013 05:50:28 +0000 (22:50 -0700)
committerKarl Williamson <public@khwilliamson.com>
Sat, 4 Jan 2014 20:33:04 +0000 (13:33 -0700)
This macro toggles to the C locale.  It should not depend on being in
the scope of 'use locale' to do that, so remove the check.  I couldn't
figure out a test case for this, but I'm pretty sure there is a some
convoluted scheme that this change averts a bug from.

perl.h

diff --git a/perl.h b/perl.h
index 42c4a4c..328c969 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -5237,7 +5237,7 @@ typedef struct am_table_short AMTS;
        set_numeric_local();
 
 #define STORE_NUMERIC_LOCAL_SET_STANDARD() \
-       bool was_local = PL_numeric_local && IN_LOCALE; \
+       bool was_local = PL_numeric_local; \
        if (was_local) SET_NUMERIC_STANDARD();
 
 #define STORE_NUMERIC_STANDARD_SET_LOCAL() \