This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Don't test the core XS code yet with PERL_DEBUG_COW > 1
[perl5.git] / numeric.c
index aeb1a02..3015842 100644 (file)
--- a/numeric.c
+++ b/numeric.c
@@ -1,7 +1,7 @@
 /*    numeric.c
  *
  *    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- *    2000, 2001, 2002, 2003, by Larry Wall and others
+ *    2000, 2001, 2002, 2003, 2005 by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -261,6 +261,7 @@ number may use '_' characters to separate digits.
 
 UV
 Perl_grok_hex(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) {
+    dVAR;
     const char *s = start;
     STRLEN len = *len_p;
     UV value = 0;
@@ -269,7 +270,6 @@ Perl_grok_hex(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) {
     const UV max_div_16 = UV_MAX / 16;
     const bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
     bool overflowed = FALSE;
-    const char *hexdigit;
 
     if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
         /* strip off leading x or 0x.
@@ -288,7 +288,7 @@ Perl_grok_hex(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) {
     }
 
     for (; len-- && *s; s++) {
-        hexdigit = strchr(PL_hexdigit, *s);
+       const char *hexdigit = strchr(PL_hexdigit, *s);
         if (hexdigit) {
             /* Write it in this wonky order with a goto to attempt to get the
                compiler to make the common case integer-only loop pretty tight.
@@ -757,7 +757,7 @@ S_mulexp10(NV value, I32 exponent)
     if (exponent == 0)
        return value;
     if (value == 0)
-       return 0;
+       return (NV)0;
 
     /* On OpenVMS VAX we by default use the D_FLOAT double format,
      * and that format does not have *easy* capabilities [1] for
@@ -1017,3 +1017,13 @@ Perl_my_frexpl(long double x, int *e) {
        return (scalbnl(x, -*e));
 }
 #endif
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ *
+ * ex: set ts=8 sts=4 sw=4 noet:
+ */