mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
use Py_CHARMASK; and don't check for neg. float to the float power here
This commit is contained in:
parent
2497eada60
commit
9fa2c11613
3 changed files with 8 additions and 12 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue