diff Objects/typeobject.c @ 42449:ed37542f473e

Fix an obvious bug caused by a switch to Unicode. However, this will need to be fixed further to allow non-ASCII letters in names; leaving this to MvL.
author Guido van Rossum <guido@python.org>
date Sat, 04 Aug 2007 16:43:59 +0000
parents 02c27177df79
children e7fd327e0c19
line wrap: on
line diff
--- a/Objects/typeobject.c	Sat Aug 04 03:46:11 2007 +0000
+++ b/Objects/typeobject.c	Sat Aug 04 16:43:59 2007 +0000
@@ -1579,7 +1579,8 @@
 	if (n == 0)
 		n = 1;
 	for (i = 0; i < n; i++, p++) {
-		if (i > 255 || (!(i == 0 ? isalpha(*p) : isalnum(*p)) && *p != '_')) {
+		if (*p > 127 ||
+		    (!(i == 0 ? isalpha(*p) : isalnum(*p)) && *p != '_')) {
 			PyErr_SetString(PyExc_TypeError,
 					"__slots__ must be identifiers");
 			return 0;