Skip to content

Commit df9f759

Browse files
authored
compiler: Merge except_table and cnotab (GH-31614)
1 parent 422fdb3 commit df9f759

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Python/compile.c

+6
Original file line numberDiff line numberDiff line change
@@ -8272,6 +8272,9 @@ assemble(struct compiler *c, int addNone)
82728272
if (_PyBytes_Resize(&a.a_except_table, a.a_except_table_off) < 0) {
82738273
goto error;
82748274
}
8275+
if (!merge_const_one(c, &a.a_except_table)) {
8276+
goto error;
8277+
}
82758278
if (!assemble_start_line_range(&a)) {
82768279
return 0;
82778280
}
@@ -8293,6 +8296,9 @@ assemble(struct compiler *c, int addNone)
82938296
if (_PyBytes_Resize(&a.a_cnotab, a.a_cnotab_off) < 0) {
82948297
goto error;
82958298
}
8299+
if (!merge_const_one(c, &a.a_cnotab)) {
8300+
goto error;
8301+
}
82968302
if (_PyBytes_Resize(&a.a_bytecode, a.a_offset * sizeof(_Py_CODEUNIT)) < 0) {
82978303
goto error;
82988304
}

0 commit comments

Comments
 (0)