summaryrefslogtreecommitdiffstats
path: root/Objects/codeobject.c
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2022-02-26 16:35:03 (GMT)
committerGitHub <noreply@github.com>2022-02-26 16:35:03 (GMT)
commit0d9b565e62a5fc8c3e9b8c64cce764fe084ccb2b (patch)
tree240f3538d78b4f390b97fc1e0a2c1e17102f0d49 /Objects/codeobject.c
parentedbee56d698ebb4489aa68311f44d104a23f5eb7 (diff)
downloadcpython-0d9b565e62a5fc8c3e9b8c64cce764fe084ccb2b.zip
cpython-0d9b565e62a5fc8c3e9b8c64cce764fe084ccb2b.tar.gz
cpython-0d9b565e62a5fc8c3e9b8c64cce764fe084ccb2b.tar.bz2
Propagate errors (however unlikely) from _Py_Deepfreeze_Init() (GH-31596)
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r--Objects/codeobject.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index f947595..5a87e6c 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -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;
}