Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 5287:5af766a1b531 legacy-trunk
Tweaks to keep the Microsoft compiler quier.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 09 Apr 1997 19:24:53 +0000 |
| parents | 38878f1cd4f1 |
| children | 5880384d7c71 |
line wrap: on
line diff
--- a/Python/compile.c Wed Apr 09 18:22:28 1997 +0000 +++ b/Python/compile.c Wed Apr 09 19:24:53 1997 +0000 @@ -182,6 +182,9 @@ (hashfunc)code_hash, /*tp_hash*/ }; +#define NAME_CHARS \ + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz" + codeobject * newcodeobject(argcount, nlocals, stacksize, flags, code, consts, names, varnames, filename, name, @@ -237,7 +240,7 @@ if (!is_stringobject(v)) continue; p = getstringvalue(v); - if (strspn(p, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz") + if ((int)strspn(p, NAME_CHARS) != getstringsize(v)) continue; PyString_InternInPlace(&PyTuple_GET_ITEM(consts, i));
