commit | 99af7dbc07a8c7e52c081d2b9398ce61cf40215a | [log] [tgz] |
---|---|---|
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | Tue Feb 05 00:26:21 2008 +0000 |
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | Tue Feb 05 00:26:21 2008 +0000 |
tree | 62182da9e7991631ecb892e54c079ff21d9429af | |
parent | 6fd03bb6070586a3b069c90cf3892ba7573d6bf5 [diff] |
Change r60575 broke test_compile: there is no need to emit co_lnotab item when both offsets are zeros.
diff --git a/Python/compile.c b/Python/compile.c index f9b5ac4..83a8fc0 100644 --- a/Python/compile.c +++ b/Python/compile.c
@@ -3560,6 +3560,9 @@ assert(d_bytecode >= 0); assert(d_lineno >= 0); + if(d_bytecode == 0 && d_lineno == 0) + return 1; + if (d_bytecode > 255) { int j, nbytes, ncodes = d_bytecode / 255; nbytes = a->a_lnotab_off + 2 * ncodes;