Change PL_numeric_radix to PL_numeric_radix_sv (and leave in
Jarkko Hietaniemi [Mon, 30 Apr 2001 11:15:12 +0000 (11:15 +0000)]
a dummy for PL_numeric_radix); no pressing reason to break
binary compatibility; regen API.

p4raw-id: //depot/perl@9910

embedvar.h
global.sym
intrpvar.h
perl.c
perl.h
perlapi.c
perlapi.h
pod/perlapi.pod
sv.c
util.c

index 8244ccc..0cf1136 100644 (file)
 #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)
 #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)
 #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)
 #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
index 08f3d5e..f54a3fc 100644 (file)
@@ -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
index 8ecd10f..d2f8e73 100644 (file)
@@ -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
diff --git a/perl.c b/perl.c
index 4a423dc..c57eaa8 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -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 */
diff --git a/perl.h b/perl.h
index 57afb3e..8d9263d 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -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; \
index 63f94a9..e0432f7 100644 (file)
--- a/perlapi.c
+++ b/perlapi.c
@@ -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
index 1912ccc..b066a76 100644 (file)
--- a/perlapi.h
+++ b/perlapi.h
@@ -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
index 5fbc201..af5a1bc 100644 (file)
@@ -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>
diff --git a/sv.c b/sv.c
index e8c2372..7f62a78 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -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 */
diff --git a/util.c b/util.c
index 52872a8..720bcf0 100644 (file)
--- a/util.c
+++ b/util.c
@@ -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 */
 }