summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2022-03-01 01:27:20 (GMT)
committerGitHub <noreply@github.com>2022-03-01 01:27:20 (GMT)
commitdf9f7597559b6256924fcd3a1c3dc24cd5c5edaf (patch)
tree83627d4ec8c9e8115d85a52a4fdb14fdf68d1341 /Python/compile.c
parent422fdb37172c145043d4f1276adad43ff375f0d5 (diff)
downloadcpython-df9f7597559b6256924fcd3a1c3dc24cd5c5edaf.zip
cpython-df9f7597559b6256924fcd3a1c3dc24cd5c5edaf.tar.gz
cpython-df9f7597559b6256924fcd3a1c3dc24cd5c5edaf.tar.bz2
compiler: Merge except_table and cnotab (GH-31614)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index ea9c3c8..3609ff8 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -8272,6 +8272,9 @@ assemble(struct compiler *c, int addNone)
if (_PyBytes_Resize(&a.a_except_table, a.a_except_table_off) < 0) {
goto error;
}
+ if (!merge_const_one(c, &a.a_except_table)) {
+ goto error;
+ }
if (!assemble_start_line_range(&a)) {
return 0;
}
@@ -8293,6 +8296,9 @@ assemble(struct compiler *c, int addNone)
if (_PyBytes_Resize(&a.a_cnotab, a.a_cnotab_off) < 0) {
goto error;
}
+ if (!merge_const_one(c, &a.a_cnotab)) {
+ goto error;
+ }
if (_PyBytes_Resize(&a.a_bytecode, a.a_offset * sizeof(_Py_CODEUNIT)) < 0) {
goto error;
}