]> granicus.if.org Git - python/commitdiff
Make Python/makeopcodetargets runnable with Python 2.3. With any luck, this
authorMark Dickinson <dickinsm@gmail.com>
Sat, 31 Jan 2009 12:12:41 +0000 (12:12 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sat, 31 Jan 2009 12:12:41 +0000 (12:12 +0000)
should solve the 'failed compile' on the x86 gentoo 3.x buildbot.

Python/makeopcodetargets.py

index 6b1ab43272784d94794ac6dc3ad95ac32a39ff6b..a85ac5215107ab0bde8326370a5ea2d13daaeca2 100755 (executable)
@@ -3,6 +3,9 @@
 (for compilers supporting computed gotos or "labels-as-values", such as gcc).
 """
 
+# This code should stay compatible with Python 2.3, at least while
+# some of the buildbots have Python 2.3 as their system Python.
+
 import imp
 import os
 
@@ -25,7 +28,7 @@ def write_contents(f):
             continue
         targets[op] = "TARGET_%s" % opname
     f.write("static void *opcode_targets[256] = {\n")
-    f.write(",\n".join("\t&&%s" % s for s in targets))
+    f.write(",\n".join(["\t&&%s" % s for s in targets]))
     f.write("\n};\n")