Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit67969f5

Browse files
authored
Correct micro release number and add a couple of asserts. (GH-25224)
1 parent1be456a commit67969f5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎Lib/importlib/_bootstrap_external.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def _write_atomic(path, data, mode=0o666):
348348
# Python 3.10a2 3433 (RERAISE restores f_lasti if oparg != 0)
349349
# Python 3.10a6 3434 (PEP 634: Structural Pattern Matching)
350350
# Python 3.10a7 3435 Use instruction offsets (as opposed to byte offsets).
351-
# Python 3.10a7 3436 (Add GEN_START bytecode #43683)
351+
# Python 3.10b1 3436 (Add GEN_START bytecode #43683)
352352

353353
#
354354
# MAGIC must change whenever the bytecode emitted by the compiler may no

‎Python/compile.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6162,8 +6162,7 @@ stackdepth(struct compiler *c)
61626162
entryblock=b;
61636163
nblocks++;
61646164
}
6165-
if (!entryblock)
6166-
return0;
6165+
assert(entryblock!=NULL);
61676166
stack= (basicblock**)PyObject_Malloc(sizeof(basicblock*)*nblocks);
61686167
if (!stack) {
61696168
PyErr_NoMemory();
@@ -6725,14 +6724,15 @@ assemble(struct compiler *c, int addNone)
67256724
nblocks++;
67266725
entryblock=b;
67276726
}
6727+
assert(entryblock!=NULL);
67286728

67296729
if (insert_generator_prefix(c,entryblock)) {
67306730
gotoerror;
67316731
}
67326732

67336733
/* Set firstlineno if it wasn't explicitly set. */
67346734
if (!c->u->u_firstlineno) {
6735-
if (entryblock&&entryblock->b_instr&&entryblock->b_instr->i_lineno)
6735+
if (entryblock->b_instr&&entryblock->b_instr->i_lineno)
67366736
c->u->u_firstlineno=entryblock->b_instr->i_lineno;
67376737
else
67386738
c->u->u_firstlineno=1;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp