diff options
-rw-r--r-- | embedvar.h | 12 | ||||
-rw-r--r-- | global.sym | 3 | ||||
-rw-r--r-- | intrpvar.h | 11 | ||||
-rw-r--r-- | perl.c | 2 | ||||
-rw-r--r-- | perl.h | 2 | ||||
-rw-r--r-- | perlapi.c | 25 | ||||
-rw-r--r-- | perlapi.h | 6 | ||||
-rw-r--r-- | pod/perlapi.pod | 2 | ||||
-rw-r--r-- | sv.c | 6 | ||||
-rw-r--r-- | util.c | 12 |
10 files changed, 59 insertions, 22 deletions
diff --git a/embedvar.h b/embedvar.h index 8244cccd72..0cf113632f 100644 --- a/embedvar.h +++ b/embedvar.h @@ -325,9 +325,10 @@ #define PL_nthreads (PERL_GET_INTERP->Inthreads) #define PL_nthreads_cond (PERL_GET_INTERP->Inthreads_cond) #define PL_nullstash (PERL_GET_INTERP->Inullstash) +#define PL_numeric_compat1 (PERL_GET_INTERP->Inumeric_compat1) #define PL_numeric_local (PERL_GET_INTERP->Inumeric_local) #define PL_numeric_name (PERL_GET_INTERP->Inumeric_name) -#define PL_numeric_radix (PERL_GET_INTERP->Inumeric_radix) +#define PL_numeric_radix_sv (PERL_GET_INTERP->Inumeric_radix_sv) #define PL_numeric_standard (PERL_GET_INTERP->Inumeric_standard) #define PL_ofmt (PERL_GET_INTERP->Iofmt) #define PL_oldbufptr (PERL_GET_INTERP->Ioldbufptr) @@ -606,9 +607,10 @@ #define PL_nthreads (vTHX->Inthreads) #define PL_nthreads_cond (vTHX->Inthreads_cond) #define PL_nullstash (vTHX->Inullstash) +#define PL_numeric_compat1 (vTHX->Inumeric_compat1) #define PL_numeric_local (vTHX->Inumeric_local) #define PL_numeric_name (vTHX->Inumeric_name) -#define PL_numeric_radix (vTHX->Inumeric_radix) +#define PL_numeric_radix_sv (vTHX->Inumeric_radix_sv) #define PL_numeric_standard (vTHX->Inumeric_standard) #define PL_ofmt (vTHX->Iofmt) #define PL_oldbufptr (vTHX->Ioldbufptr) @@ -1023,9 +1025,10 @@ #define PL_nthreads (aTHXo->interp.Inthreads) #define PL_nthreads_cond (aTHXo->interp.Inthreads_cond) #define PL_nullstash (aTHXo->interp.Inullstash) +#define PL_numeric_compat1 (aTHXo->interp.Inumeric_compat1) #define PL_numeric_local (aTHXo->interp.Inumeric_local) #define PL_numeric_name (aTHXo->interp.Inumeric_name) -#define PL_numeric_radix (aTHXo->interp.Inumeric_radix) +#define PL_numeric_radix_sv (aTHXo->interp.Inumeric_radix_sv) #define PL_numeric_standard (aTHXo->interp.Inumeric_standard) #define PL_ofmt (aTHXo->interp.Iofmt) #define PL_oldbufptr (aTHXo->interp.Ioldbufptr) @@ -1305,9 +1308,10 @@ #define PL_Inthreads PL_nthreads #define PL_Inthreads_cond PL_nthreads_cond #define PL_Inullstash PL_nullstash +#define PL_Inumeric_compat1 PL_numeric_compat1 #define PL_Inumeric_local PL_numeric_local #define PL_Inumeric_name PL_numeric_name -#define PL_Inumeric_radix PL_numeric_radix +#define PL_Inumeric_radix_sv PL_numeric_radix_sv #define PL_Inumeric_standard PL_numeric_standard #define PL_Iofmt PL_ofmt #define PL_Ioldbufptr PL_oldbufptr diff --git a/global.sym b/global.sym index 08f3d5e48c..f54a3fca08 100644 --- a/global.sym +++ b/global.sym @@ -153,6 +153,7 @@ Perl_hv_undef Perl_ibcmp Perl_ibcmp_locale Perl_init_stacks +Perl_init_tm Perl_instr Perl_is_uni_alnum Perl_is_uni_alnumc @@ -221,6 +222,7 @@ Perl_mg_length Perl_mg_magical Perl_mg_set Perl_mg_size +Perl_mini_mktime Perl_moreswitches Perl_my_atof Perl_my_bcopy @@ -236,6 +238,7 @@ Perl_my_popen Perl_my_popen_list Perl_my_setenv Perl_my_stat +Perl_my_strftime Perl_my_swap Perl_my_htonl Perl_my_ntohl diff --git a/intrpvar.h b/intrpvar.h index 8ecd10ffed..d2f8e73c2b 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -362,9 +362,9 @@ PERLVARI(Inumeric_standard, bool, TRUE) /* Assume simple numerics */ PERLVARI(Inumeric_local, bool, TRUE) /* Assume local numerics */ -PERLVAR(Inumeric_radix, SV *) - /* The radix separator if not '.' */ +PERLVAR(Inumeric_compat1, char) + /* Used to be numeric_radix */ #endif /* !USE_LOCALE_NUMERIC */ /* utf8 character classes */ @@ -464,9 +464,16 @@ PERLVAR(Ixpvlv_arenaroot,XPVLV*) /* list of allocated xpvlv areas */ PERLVAR(Ixpvbm_arenaroot,XPVBM*) /* list of allocated xpvbm areas */ PERLVAR(Ihe_arenaroot, XPV*) /* list of allocated he areas */ + /* 5.6.0 stopped here */ + PERLVAR(Ipsig_pend, int *) /* per-signal "count" of pending */ PERLVARI(Isig_pending, int,0) /* Number if highest signal pending */ +#ifdef USE_LOCALE_NUMERIC + +PERLVAR(Inumeric_radix_sv, SV *) /* The radix separator if not '.' */ + +#endif /* New variables must be added to the very end for binary compatibility. * XSUB.h provides wrapper functions via perlapi.h that make this @@ -585,7 +585,7 @@ perl_destruct(pTHXx) #ifdef USE_LOCALE_NUMERIC Safefree(PL_numeric_name); PL_numeric_name = Nullch; - SvREFCNT_dec(PL_numeric_radix); + SvREFCNT_dec(PL_numeric_radix_sv); #endif /* clear utf8 character classes */ @@ -3336,7 +3336,7 @@ typedef struct am_table_short AMTS; #define IS_NUMERIC_RADIX(s) \ ((PL_hints & HINT_LOCALE) && \ - PL_numeric_radix && memEQ(s, SvPVX(PL_numeric_radix), SvCUR(PL_numeric_radix))) + PL_numeric_radix_sv && memEQ(s, SvPVX(PL_numeric_radix_sv), SvCUR(PL_numeric_radix_sv))) #define STORE_NUMERIC_LOCAL_SET_STANDARD() \ bool was_local = (PL_hints & HINT_LOCALE) && PL_numeric_local; \ @@ -1097,6 +1097,13 @@ Perl_init_stacks(pTHXo) ((CPerlObj*)pPerl)->Perl_init_stacks(); } +#undef Perl_init_tm +void +Perl_init_tm(pTHXo_ struct tm *ptm) +{ + ((CPerlObj*)pPerl)->Perl_init_tm(ptm); +} + #undef Perl_instr char* Perl_instr(pTHXo_ const char* big, const char* little) @@ -1588,6 +1595,13 @@ Perl_mg_size(pTHXo_ SV* sv) return ((CPerlObj*)pPerl)->Perl_mg_size(sv); } +#undef Perl_mini_mktime +void +Perl_mini_mktime(pTHXo_ struct tm *pm) +{ + ((CPerlObj*)pPerl)->Perl_mini_mktime(pm); +} + #undef Perl_moreswitches char* Perl_moreswitches(pTHXo_ char* s) @@ -1706,6 +1720,13 @@ Perl_my_stat(pTHXo) { return ((CPerlObj*)pPerl)->Perl_my_stat(); } + +#undef Perl_my_strftime +char * +Perl_my_strftime(pTHXo_ char *fmt, int sec, int min, int hour, int mday, int mon, int year, int wday, int yday, int isdst) +{ + return ((CPerlObj*)pPerl)->Perl_my_strftime(fmt, sec, min, hour, mday, mon, year, wday, yday, isdst); +} #if defined(MYSWAP) #undef Perl_my_swap @@ -3329,9 +3350,9 @@ Perl_swash_init(pTHXo_ char* pkg, char* name, SV* listsv, I32 minbits, I32 none) #undef Perl_swash_fetch UV -Perl_swash_fetch(pTHXo_ SV *sv, U8 *ptr) +Perl_swash_fetch(pTHXo_ SV *sv, U8 *ptr, bool do_utf8) { - return ((CPerlObj*)pPerl)->Perl_swash_fetch(sv, ptr); + return ((CPerlObj*)pPerl)->Perl_swash_fetch(sv, ptr, do_utf8); } #undef Perl_taint_env @@ -390,12 +390,14 @@ START_EXTERN_C #define PL_nthreads_cond (*Perl_Inthreads_cond_ptr(aTHXo)) #undef PL_nullstash #define PL_nullstash (*Perl_Inullstash_ptr(aTHXo)) +#undef PL_numeric_compat1 +#define PL_numeric_compat1 (*Perl_Inumeric_compat1_ptr(aTHXo)) #undef PL_numeric_local #define PL_numeric_local (*Perl_Inumeric_local_ptr(aTHXo)) #undef PL_numeric_name #define PL_numeric_name (*Perl_Inumeric_name_ptr(aTHXo)) -#undef PL_numeric_radix -#define PL_numeric_radix (*Perl_Inumeric_radix_ptr(aTHXo)) +#undef PL_numeric_radix_sv +#define PL_numeric_radix_sv (*Perl_Inumeric_radix_sv_ptr(aTHXo)) #undef PL_numeric_standard #define PL_numeric_standard (*Perl_Inumeric_standard_ptr(aTHXo)) #undef PL_ofmt diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 5fbc20162c..af5a1bc803 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -532,7 +532,7 @@ Found in file gv.h Returns the glob with the given C<name> and a defined subroutine or C<NULL>. The glob lives in the given C<stash>, or in the stashes -accessible via @ISA and @UNIVERSAL. +accessible via @ISA and UNIVERSAL::. The argument C<level> should be either 0 or -1. If C<level==0>, as a side-effect creates a glob with the given C<name> in the given C<stash> @@ -2533,7 +2533,7 @@ Perl_looks_like_number(pTHX_ SV *sv) ) { #ifdef USE_LOCALE_NUMERIC if (specialradix) - s += SvCUR(PL_numeric_radix); + s += SvCUR(PL_numeric_radix_sv); else #endif s++; @@ -2549,7 +2549,7 @@ Perl_looks_like_number(pTHX_ SV *sv) ) { #ifdef USE_LOCALE_NUMERIC if (specialradix) - s += SvCUR(PL_numeric_radix); + s += SvCUR(PL_numeric_radix_sv); else #endif s++; @@ -9081,7 +9081,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_numeric_name = SAVEPV(proto_perl->Inumeric_name); PL_numeric_standard = proto_perl->Inumeric_standard; PL_numeric_local = proto_perl->Inumeric_local; - PL_numeric_radix = sv_dup_inc(proto_perl->Inumeric_radix); + PL_numeric_radix_sv = sv_dup_inc(proto_perl->Inumeric_radix_sv); #endif /* !USE_LOCALE_NUMERIC */ /* utf8 character classes */ @@ -577,18 +577,18 @@ Perl_set_numeric_radix(pTHX) lc = localeconv(); if (lc && lc->decimal_point) { if (lc->decimal_point[0] == '.' && lc->decimal_point[1] == 0) { - SvREFCNT_dec(PL_numeric_radix); - PL_numeric_radix = 0; + SvREFCNT_dec(PL_numeric_radix_sv); + PL_numeric_radix_sv = Nullsv; } else { - if (PL_numeric_radix) - sv_setpv(PL_numeric_radix, lc->decimal_point); + if (PL_numeric_radix_sv) + sv_setpv(PL_numeric_radix_sv, lc->decimal_point); else - PL_numeric_radix = newSVpv(lc->decimal_point, 0); + PL_numeric_radix_sv = newSVpv(lc->decimal_point, 0); } } else - PL_numeric_radix = 0; + PL_numeric_radix_sv = Nullsv; # endif /* HAS_LOCALECONV */ #endif /* USE_LOCALE_NUMERIC */ } |