summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorVadim Konovalov <vkonovalov@lucent.com>2000-11-04 13:15:48 +0300
committerJarkko Hietaniemi <jhi@iki.fi>2000-11-04 22:36:54 +0000
commitff4fed7c8390873fd72003ab33b27667ceea7183 (patch)
treeef7650d03157974d4fdc0c683c3bf6e5af6d0f80 /perl.h
parent88e7acd2863313b860674bf9fe83289b008d2426 (diff)
downloadperl-ff4fed7c8390873fd72003ab33b27667ceea7183.tar.gz
Locales support (setlocale) fixes
From: "Konovalov, Vadim" <vkonovalov@lucent.com> Message-ID: <402099F49BEED211999700805FC7359F82511F@ru0028exch01.spb.lucent.com> Modified quite a bit to be more portable. p4raw-id: //depot/perl@7545
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/perl.h b/perl.h
index 6f46dcdf19..80bf5ae87d 100644
--- a/perl.h
+++ b/perl.h
@@ -3139,16 +3139,10 @@ typedef struct am_table_short AMTS;
#ifdef USE_LOCALE_NUMERIC
#define SET_NUMERIC_STANDARD() \
- STMT_START { \
- if (! PL_numeric_standard) \
- set_numeric_standard(); \
- } STMT_END
+ set_numeric_standard();
#define SET_NUMERIC_LOCAL() \
- STMT_START { \
- if (! PL_numeric_local) \
- set_numeric_local(); \
- } STMT_END
+ set_numeric_local();
#define IS_NUMERIC_RADIX(c) \
((PL_hints & HINT_LOCALE) && \
@@ -3156,11 +3150,11 @@ typedef struct am_table_short AMTS;
#define STORE_NUMERIC_LOCAL_SET_STANDARD() \
bool was_local = (PL_hints & HINT_LOCALE) && PL_numeric_local; \
- if (!was_local) SET_NUMERIC_STANDARD();
+ if (was_local) SET_NUMERIC_STANDARD();
#define STORE_NUMERIC_STANDARD_SET_LOCAL() \
- bool was_standard = !(PL_hints & HINT_LOCALE) || PL_numeric_standard; \
- if (!was_standard) SET_NUMERIC_LOCAL();
+ bool was_standard = (PL_hints & HINT_LOCALE) && PL_numeric_standard; \
+ if (was_standard) SET_NUMERIC_LOCAL();
#define RESTORE_NUMERIC_LOCAL() \
if (was_local) SET_NUMERIC_LOCAL();