diff Objects/floatobject.c @ 2308:14b126d0b5be legacy-trunk

use Py_CHARMASK; and don't check for neg. float to the float power here
author Guido van Rossum <guido@python.org>
date Fri, 10 Feb 1995 17:00:37 +0000
parents cfbab79a799f
children 43f9e7549c70
line wrap: on
line diff
--- a/Objects/floatobject.c	Fri Feb 10 17:00:27 1995 +0000
+++ b/Objects/floatobject.c	Fri Feb 10 17:00:37 1995 +0000
@@ -136,7 +136,7 @@
 	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 @@
 		}
 		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);