diff options
author | Vadim Konovalov <vkonovalov@lucent.com> | 2000-11-04 13:15:48 +0300 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-11-04 22:36:54 +0000 |
commit | ff4fed7c8390873fd72003ab33b27667ceea7183 (patch) | |
tree | ef7650d03157974d4fdc0c683c3bf6e5af6d0f80 /perl.h | |
parent | 88e7acd2863313b860674bf9fe83289b008d2426 (diff) | |
download | perl-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.h | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -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(); |