[Python-3000-checkins] r56737 - python/branches/py3k-struni/Objects/typeobject.c
guido.van.rossum
python-3000-checkins at python.org
Sat Aug 4 18:43:59 CEST 2007
Author: guido.van.rossum
Date: Sat Aug 4 18:43:59 2007
New Revision: 56737
Modified:
python/branches/py3k-struni/Objects/typeobject.c
Log:
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.
Modified: python/branches/py3k-struni/Objects/typeobject.c
==============================================================================
--- python/branches/py3k-struni/Objects/typeobject.c (original)
+++ python/branches/py3k-struni/Objects/typeobject.c Sat Aug 4 18:43:59 2007
@@ -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;
More information about the Python-3000-checkins
mailing list