diff Objects/complexobject.c @ 53712:1f00bc1d115a legacy-trunk

Eliminate some locale-dependent calls to isspace and tolower.
author Mark Dickinson <dickinsm@gmail.com>
date Sun, 03 May 2009 20:59:48 +0000
parents 34e7c1b14495
children 1d8f24d40c2c
line wrap: on
line diff
--- a/Objects/complexobject.c	Sun May 03 20:39:06 2009 +0000
+++ b/Objects/complexobject.c	Sun May 03 20:59:48 2009 +0000
@@ -950,13 +950,13 @@
 
 	/* position on first nonblank */
 	start = s;
-	while (*s && isspace(Py_CHARMASK(*s)))
+	while (Py_ISSPACE(*s))
 		s++;
 	if (*s == '(') {
 		/* Skip over possible bracket from repr(). */
 		got_bracket = 1;
 		s++;
-		while (*s && isspace(Py_CHARMASK(*s)))
+		while (Py_ISSPACE(*s))
 			s++;
 	}
 
@@ -1038,7 +1038,7 @@
 	}
 
 	/* trailing whitespace and closing bracket */
-	while (*s && isspace(Py_CHARMASK(*s)))
+	while (Py_ISSPACE(*s))
 		s++;
 	if (got_bracket) {
 		/* if there was an opening parenthesis, then the corresponding
@@ -1046,7 +1046,7 @@
 		if (*s != ')')
 			goto parse_error;
 		s++;
-		while (*s && isspace(Py_CHARMASK(*s)))
+		while (Py_ISSPACE(*s))
 			s++;
 	}