Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup
  • Loading branch information
brandtbucher committed Dec 15, 2022
commit 23ba802a35d64907f293b4fb0c98b8c20d673b5e
6 changes: 4 additions & 2 deletions Python/marshal.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,9 +971,11 @@ r_bytecode(RFILE *p)
}
assert(0x00 <= opcode && opcode < 0x100);
assert(0x00 <= oparg && oparg < 0x100);
buffer[i++] = _Py_MAKECODEUNIT(opcode, oparg);
buffer[i].opcode = opcode;
buffer[i++].oparg = oparg;
for (int j = 0; j < _PyOpcode_Caches[opcode]; j++) {
buffer[i++] = _Py_MAKECODEUNIT(CACHE, oparg);
buffer[i].opcode = CACHE;
buffer[i++].oparg = 0;
Comment on lines 344 to
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I'd rather see the i++ on separate lines instead of this hybrid approach.

}
}
if (i != size) {
Expand Down