diff options
author | Karl Williamson <khw@cpan.org> | 2017-08-28 17:21:09 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2017-11-08 20:52:52 -0700 |
commit | 892e646556f1997b0384dc508d3223c2c2a7be74 (patch) | |
tree | 0789fa4b3c67af8a23eef78b216d951a41530679 | |
parent | 755599dacf0896e06380d44bf5f7dd624678415a (diff) | |
download | perl-892e646556f1997b0384dc508d3223c2c2a7be74.tar.gz |
Change name of locale per-interpreter variable
The real purpose of this internal variable is to give the name of the
locale that is the underlying one for the C program. Various macros
already indicate that. This furthers the process.
-rw-r--r-- | embedvar.h | 2 | ||||
-rw-r--r-- | intrpvar.h | 6 | ||||
-rw-r--r-- | locale.c | 10 | ||||
-rw-r--r-- | perl.h | 2 | ||||
-rw-r--r-- | sv.c | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/embedvar.h b/embedvar.h index 76efb9104b..898b71cd31 100644 --- a/embedvar.h +++ b/embedvar.h @@ -219,10 +219,10 @@ #define PL_my_cxt_size (vTHX->Imy_cxt_size) #define PL_na (vTHX->Ina) #define PL_nomemok (vTHX->Inomemok) -#define PL_numeric_local (vTHX->Inumeric_local) #define PL_numeric_name (vTHX->Inumeric_name) #define PL_numeric_radix_sv (vTHX->Inumeric_radix_sv) #define PL_numeric_standard (vTHX->Inumeric_standard) +#define PL_numeric_underlying (vTHX->Inumeric_underlying) #define PL_ofsgv (vTHX->Iofsgv) #define PL_oldname (vTHX->Ioldname) #define PL_op (vTHX->Iop) diff --git a/intrpvar.h b/intrpvar.h index 87f33d8bb4..d88628a094 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -613,9 +613,9 @@ PERLVARI(I, perl_destruct_level, signed char, 0) #ifdef USE_LOCALE_NUMERIC PERLVARI(I, numeric_standard, int, TRUE) - /* Assume simple numerics */ -PERLVARI(I, numeric_local, bool, TRUE) - /* Assume local numerics */ + /* Assume C locale numerics */ +PERLVARI(I, numeric_underlying, bool, TRUE) + /* Assume underlying locale numerics */ PERLVAR(I, numeric_name, char *) /* Name of current numeric locale */ PERLVAR(I, numeric_radix_sv, SV *) /* The radix separator if not '.' */ @@ -211,7 +211,7 @@ Perl_new_numeric(pTHX_ const char *newnum) * * This sets several interpreter-level variables: * PL_numeric_name The underlying locale's name: a copy of 'newnum' - * PL_numeric_local A boolean indicating if the toggled state is such + * PL_numeric_underlying A boolean indicating if the toggled state is such * that the current locale is the program's underlying * locale * PL_numeric_standard An int indicating if the toggled state is such @@ -233,14 +233,14 @@ Perl_new_numeric(pTHX_ const char *newnum) Safefree(PL_numeric_name); PL_numeric_name = NULL; PL_numeric_standard = TRUE; - PL_numeric_local = TRUE; + PL_numeric_underlying = TRUE; return; } save_newnum = stdize_locale(savepv(newnum)); PL_numeric_standard = isNAME_C_OR_POSIX(save_newnum); - PL_numeric_local = TRUE; + PL_numeric_underlying = TRUE; if (! PL_numeric_name || strNE(PL_numeric_name, save_newnum)) { Safefree(PL_numeric_name); @@ -273,7 +273,7 @@ Perl_set_numeric_standard(pTHX) do_setlocale_c(LC_NUMERIC, "C"); PL_numeric_standard = TRUE; - PL_numeric_local = isNAME_C_OR_POSIX(PL_numeric_name); + PL_numeric_underlying = isNAME_C_OR_POSIX(PL_numeric_name); set_numeric_radix(0); # ifdef DEBUGGING @@ -302,7 +302,7 @@ Perl_set_numeric_local(pTHX) do_setlocale_c(LC_NUMERIC, PL_numeric_name); PL_numeric_standard = isNAME_C_OR_POSIX(PL_numeric_name); - PL_numeric_local = TRUE; + PL_numeric_underlying = TRUE; set_numeric_radix(1); # ifdef DEBUGGING @@ -5682,7 +5682,7 @@ expression, but with an empty argument list, like this: * contrary be noops, in the dynamic scope by setting PL_numeric_standard to 2. * */ # define _NOT_IN_NUMERIC_UNDERLYING \ - (! PL_numeric_local && PL_numeric_standard < 2) + (! PL_numeric_underlying && PL_numeric_standard < 2) # define DECLARATION_FOR_LC_NUMERIC_MANIPULATION \ void (*_restore_LC_NUMERIC_function)(pTHX) = NULL @@ -3141,7 +3141,7 @@ Perl_sv_2pv_flags(pTHX_ SV *const sv, STRLEN *const lp, const I32 flags) DECLARATION_FOR_LC_NUMERIC_MANIPULATION; STORE_LC_NUMERIC_SET_TO_NEEDED(); - local_radix = PL_numeric_local && PL_numeric_radix_sv; + local_radix = PL_numeric_underlying && PL_numeric_radix_sv; if (local_radix && SvCUR(PL_numeric_radix_sv) > 1) { size += SvCUR(PL_numeric_radix_sv) - 1; s = SvGROW_mutable(sv, size); @@ -15337,7 +15337,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, #ifdef USE_LOCALE_NUMERIC PL_numeric_standard = proto_perl->Inumeric_standard; - PL_numeric_local = proto_perl->Inumeric_local; + PL_numeric_underlying = proto_perl->Inumeric_underlying; #endif /* !USE_LOCALE_NUMERIC */ /* Did the locale setup indicate UTF-8? */ |