Propagate errors (however unlikely) from _Py_Deepfreeze_Init() (GH-31596)

This commit is contained in:
Kumar Aditya 2022-02-26 22:05:03 +05:30 committed by GitHub
parent edbee56d69
commit 0d9b565e62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 25 additions and 13 deletions

View file

@ -1931,14 +1931,20 @@ _PyStaticCode_Dealloc(PyCodeObject *co)
}
}
void
int
_PyStaticCode_InternStrings(PyCodeObject *co)
{
int res = intern_strings(co->co_names);
assert(res == 0);
if (res < 0) {
return -1;
}
res = intern_string_constants(co->co_consts, NULL);
assert(res == 0);
if (res < 0) {
return -1;
}
res = intern_strings(co->co_localsplusnames);
assert(res == 0);
(void)res;
if (res < 0) {
return -1;
}
return 0;
}