From 5619c39a3d8210960bf074437c816da1f97d49ae Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Thu, 21 Aug 2008 23:48:29 +0200 Subject: [PATCH] Disallowing buffer indexing as for loop target, as it is not implemented. --- Cython/Compiler/Nodes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 7eb3ede8..c413c49d 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -3297,6 +3297,8 @@ class ForFromStatNode(LoopNode, StatNode): # "Cannot assign integer to variable of type '%s'" % target_type) if target_type.is_numeric: self.is_py_target = 0 + if isinstance(self.target, ExprNodes.IndexNode) and self.target.is_buffer_access: + raise error(self.pos, "Buffer indexing not allowed as for loop target.") self.loopvar_name = self.target.entry.cname self.py_loopvar_node = None else: -- 2.26.2