summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-02-10 17:00:37 (GMT)
committerGuido van Rossum <guido@python.org>1995-02-10 17:00:37 (GMT)
commit9fa2c116139a22d647fc736cf36dfd815c6de944 (patch)
treee4db1c79b8e5adf691f1d418e9a074ff2c906cd7 /Objects/floatobject.c
parent2497eada60349dc5f2eb8314f2128069374a35a2 (diff)
downloadcpython-9fa2c116139a22d647fc736cf36dfd815c6de944.zip
cpython-9fa2c116139a22d647fc736cf36dfd815c6de944.tar.gz
cpython-9fa2c116139a22d647fc736cf36dfd815c6de944.tar.bz2
use Py_CHARMASK; and don't check for neg. float to the float power here
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index c7bdbed..60dcca9 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -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);