From: Olaf Flebbe Date: Wed, 31 Jan 2001 23:15:34 +0000 (+0100) Subject: All the uses of PL_numeric_radix must be protected by X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9c7192ba427eba0a6c759f2cd2819b1ed1ed554b;p=p5sagit%2Fp5-mst-13.2.git All the uses of PL_numeric_radix must be protected by USE_LOCALE_NUMERIC, noticed by Olaf Flebbe in Subject: [perl-5-6-1-trial2] patches for EPOC Message-ID: p4raw-id: //depot/perl@8648 --- diff --git a/sv.c b/sv.c index 09ca49a..7d6f110 100644 --- 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 */