diff Python/compile.c @ 45160:3f8f86493daa legacy-trunk

Change r60575 broke test_compile: there is no need to emit co_lnotab item when both offsets are zeros.
author Amaury Forgeot d'Arc <amauryfa@gmail.com>
date Tue, 05 Feb 2008 00:26:21 +0000
parents 643c1397f954
children c73a2802b738
line wrap: on
line diff
--- a/Python/compile.c	Mon Feb 04 21:45:05 2008 +0000
+++ b/Python/compile.c	Tue Feb 05 00:26:21 2008 +0000
@@ -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;