From: Inada Naoki Date: Tue, 1 Mar 2022 01:27:20 +0000 (+0900) Subject: compiler: Merge except_table and cnotab (GH-31614) X-Git-Tag: v3.11.0a6~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=df9f7597559b6256924fcd3a1c3dc24cd5c5edaf;p=thirdparty%2FPython%2Fcpython.git compiler: Merge except_table and cnotab (GH-31614) --- diff --git a/Python/compile.c b/Python/compile.c index ea9c3c8d4826..3609ff8f4fb9 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; }