mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
bpo-46430: Intern strings in deep-frozen modules (GH-30683)
This commit is contained in:
parent
128ab092ca
commit
c0a5ebeb12
4 changed files with 16 additions and 0 deletions
|
@ -1924,3 +1924,15 @@ _PyStaticCode_Dealloc(PyCodeObject *co)
|
|||
co->co_weakreflist = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_PyStaticCode_InternStrings(PyCodeObject *co)
|
||||
{
|
||||
int res = intern_strings(co->co_names);
|
||||
assert(res == 0);
|
||||
res = intern_string_constants(co->co_consts, NULL);
|
||||
assert(res == 0);
|
||||
res = intern_strings(co->co_localsplusnames);
|
||||
assert(res == 0);
|
||||
(void)res;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue