mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Tweaks to keep the Microsoft compiler quier.
This commit is contained in:
parent
8017767420
commit
644a12b00c
8 changed files with 36 additions and 19 deletions
|
@ -182,6 +182,9 @@ typeobject Codetype = {
|
|||
(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 @@ newcodeobject(argcount, nlocals, stacksize, flags,
|
|||
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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue