All the uses of PL_numeric_radix must be protected by
Olaf Flebbe [Wed, 31 Jan 2001 23:15:34 +0000 (00:15 +0100)]
USE_LOCALE_NUMERIC, noticed by Olaf Flebbe in

Subject: [perl-5-6-1-trial2] patches for EPOC
Message-ID: <Pine.LNX.4.02.10101312314470.5682-100000@milkyway.science-computing.de>

p4raw-id: //depot/perl@8648

sv.c

diff --git a/sv.c b/sv.c
index 09ca49a..7d6f110 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -2448,7 +2448,9 @@ Perl_looks_like_number(pTHX_ SV *sv)
     I32 numtype = 0;
     I32 sawinf  = 0;
     STRLEN len;
+#ifdef USE_LOCALE_NUMERIC
     bool specialradix = FALSE;
+#endif
 
     if (SvPOK(sv)) {
        sbegin = SvPVX(sv);
@@ -2518,9 +2520,11 @@ Perl_looks_like_number(pTHX_ SV *sv)
            || (specialradix = IS_NUMERIC_RADIX(s))
 #endif
            ) {
+#ifdef USE_LOCALE_NUMERIC
            if (specialradix)
                s += SvCUR(PL_numeric_radix);
            else
+#endif
                s++;
            numtype |= IS_NUMBER_NOT_INT;
             while (isDIGIT(*s))  /* optional digits after the radix */
@@ -2532,9 +2536,11 @@ Perl_looks_like_number(pTHX_ SV *sv)
            || (specialradix = IS_NUMERIC_RADIX(s))
 #endif
            ) {
+#ifdef USE_LOCALE_NUMERIC
        if (specialradix)
            s += SvCUR(PL_numeric_radix);
        else
+#endif
            s++;
        numtype |= IS_NUMBER_TO_INT_BY_ATOL | IS_NUMBER_NOT_INT;
         /* no digits before the radix means we need digits after it */