Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 85fe8a6

Browse files
committed
Issue #9566, #19617: New try to fix compilation on Windows
Some compilers (ex: Visual Studio) decode -2147483648 as a unsigned integer instead of an signed integer.
1 parent b679a2e commit 85fe8a6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ compiler_addop_i(struct compiler *c, Py_ssize_t opcode, Py_ssize_t oparg)
11831183

11841184
/* Integer arguments are limit to 16-bit. There is an extension for 32-bit
11851185
integer arguments. */
1186-
assert(-2147483648 <= opcode);
1186+
assert((-2147483647-1) <= opcode);
11871187
assert(opcode <= 2147483647);
11881188

11891189
off = compiler_next_instr(c, c->u->u_curblock);

0 commit comments

Comments
 (0)