modules/arch/x86/gen_x86_insn.py fix

Alexei Svitkine alexei.svitkine at gmail.com
Sat Dec 5 16:35:23 PST 2009


Hi,

A recent commit to support Python 3.0 actually broke support for
Python 2.4 by using syntax new in Python 2.5.

Attached is a patch that uses more conventional syntax and thus works on 2.4.

-Alexei
-------------- next part --------------
Index: modules/arch/x86/gen_x86_insn.py
===================================================================
--- modules/arch/x86/gen_x86_insn.py	(revision 2241)
+++ modules/arch/x86/gen_x86_insn.py	(working copy)
@@ -608,7 +608,10 @@
     # Merge all operand lists into single list
     # Sort by number of operands to shorten output
     all_operands = []
-    gi = groups.itervalues() if version_info[0] == 2 else groups.values()    
+    if version_info[0] == 2:
+        gi = groups.itervalues()
+    else:
+        gi = groups.values()
     for form in sorted((form for g in gi for form in g),
                        key=lambda x:len(x.operands), reverse=True):
         num_operands = len(form.operands)


More information about the yasm-devel mailing list