Make Python/makeopcodetargets runnable with Python 2.3. With any luck, this

should solve the 'failed compile' on the x86 gentoo 3.x buildbot.
This commit is contained in:
Mark Dickinson 2009-01-31 12:12:41 +00:00
parent e9deddbf8c
commit 72ead17c8a
1 changed files with 4 additions and 1 deletions

View File

@ -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")