use Py_CHARMASK; and don't check for neg. float to the float power here

This commit is contained in:
Guido van Rossum 1995-02-10 17:00:37 +00:00
parent 2497eada60
commit 9fa2c11613
3 changed files with 8 additions and 12 deletions

View file

@ -136,7 +136,7 @@ float_buf_repr(buf, v)
for (; *cp != '\0'; cp++) {
/* Any non-digit means it's not an integer;
this takes care of NAN and INF as well. */
if (!isdigit(*cp))
if (!isdigit(Py_CHARMASK(*cp)))
break;
}
if (*cp == '\0') {
@ -330,10 +330,6 @@ float_pow(v, w, z)
}
return newfloatobject(0.0);
}
if (iv < 0.0) {
err_setstr(ValueError, "negative float to float power");
return NULL;
}
errno = 0;
ix = pow(iv, iw);
CHECK(ix);