cython-devel
changeset 1523:965dc9fc3da7
tiny cleanup, fix #163
| author | Stefan Behnel <scoder@users.berlios.de> |
|---|---|
| date | Fri Dec 19 21:57:32 2008 +0100 (3 years ago) |
| parents | cb1a842e882d |
| children | 3569aa5167f1 |
| files | Cython/Compiler/Optimize.py |
line diff
1.1 --- a/Cython/Compiler/Optimize.py Fri Dec 19 20:18:44 2008 +0100
1.2 +++ b/Cython/Compiler/Optimize.py Fri Dec 19 21:57:32 2008 +0100
1.3 @@ -101,8 +101,7 @@
1.4 isinstance(function, ExprNodes.NameNode) and \
1.5 function.entry.is_builtin and \
1.6 function.name in ('range', 'xrange'):
1.7 - return self._transform_range_iteration(
1.8 - node, iterator)
1.9 + return self._transform_range_iteration(node, iterator)
1.10
1.11 return node
1.12
1.13 @@ -453,6 +452,8 @@
1.14 def _find_handler(self, call_type, function):
1.15 if not function.type.is_builtin_type:
1.16 return None
1.17 + if not isinstance(function, ExprNodes.NameNode):
1.18 + return None
1.19 handler = getattr(self, '_handle_%s_%s' % (call_type, function.name), None)
1.20 if handler is None:
1.21 handler = getattr(self, '_handle_any_%s' % function.name, None)
