Commit 62f6c827 authored by Stefan Behnel's avatar Stefan Behnel

merge

parents 0be9cd1b 8e1375e0
...@@ -3332,6 +3332,8 @@ class ForFromStatNode(LoopNode, StatNode): ...@@ -3332,6 +3332,8 @@ class ForFromStatNode(LoopNode, StatNode):
# "Cannot assign integer to variable of type '%s'" % target_type) # "Cannot assign integer to variable of type '%s'" % target_type)
if target_type.is_numeric: if target_type.is_numeric:
self.is_py_target = 0 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.loopvar_name = self.target.entry.cname
self.py_loopvar_node = None self.py_loopvar_node = None
else: else:
......
...@@ -1052,10 +1052,10 @@ cdef class ErrorBuffer: ...@@ -1052,10 +1052,10 @@ cdef class ErrorBuffer:
def __init__(self, label): def __init__(self, label):
self.label = label self.label = label
def __getbuffer__(MockBuffer self, Py_buffer* buffer, int flags): def __getbuffer__(ErrorBuffer self, Py_buffer* buffer, int flags):
raise Exception("acquiring %s" % self.label) raise Exception("acquiring %s" % self.label)
def __releasebuffer__(MockBuffer self, Py_buffer* buffer): def __releasebuffer__(ErrorBuffer self, Py_buffer* buffer):
raise Exception("releasing %s" % self.label) raise Exception("releasing %s" % self.label)
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment