]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #9566, #19617: New try to fix compilation on Windows
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 19 Nov 2013 22:03:25 +0000 (23:03 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 19 Nov 2013 22:03:25 +0000 (23:03 +0100)
Some compilers (ex: Visual Studio) decode -2147483648 as a unsigned integer
instead of an signed integer.

Python/compile.c

index 2c8db4865111c2181ca560c0da083d467517ffb9..78841d37da93c40ff797be1a8d6bcefbe13437d9 100644 (file)
@@ -1183,7 +1183,7 @@ compiler_addop_i(struct compiler *c, Py_ssize_t opcode, Py_ssize_t oparg)
 
     /* Integer arguments are limit to 16-bit. There is an extension for 32-bit
        integer arguments. */
-    assert(-2147483648 <= opcode);
+    assert((-2147483647-1) <= opcode);
     assert(opcode <= 2147483647);
 
     off = compiler_next_instr(c, c->u->u_curblock);