From 91d3c9fcc005bd6cacbe75d251020dd18e8bcd62 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Thu, 29 Oct 2009 00:59:03 -0700 Subject: [PATCH] Workaround for T441, enumerate optimization bug. --- Cython/Compiler/Optimize.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cython/Compiler/Optimize.py b/Cython/Compiler/Optimize.py index 0cff21b9..c422f8da 100644 --- a/Cython/Compiler/Optimize.py +++ b/Cython/Compiler/Optimize.py @@ -236,6 +236,10 @@ class IterationTransform(Visitor.VisitorTransform): if not counter_type.is_pyobject and not counter_type.is_int: # nothing we can do here, I guess return node + + if iterable_target.type is not PyrexTypes.py_object_type: + # this may need conversion, could be made to work + return node temp = UtilNodes.LetRefNode(ExprNodes.IntNode(enumerate_function.pos, value='0', -- 2.26.2